summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@host.loc>2008-03-25 19:49:27 +0400
committerunknown <gshchepa/uchum@host.loc>2008-03-25 19:49:27 +0400
commitf1bb7c2019db0ea039ac155ac8723690cdfc69a2 (patch)
tree28e1a9b20779b7143359afb8313b57eed91d3094
parent11504a87d1490ec99210312e2675e467c833d41e (diff)
parentd62c9e33ca09125a66f226bf7817dc466a547e91 (diff)
downloadmariadb-git-f1bb7c2019db0ea039ac155ac8723690cdfc69a2.tar.gz
Merge host.loc:/home/uchum/work/5.0-opt
into host.loc:/home/uchum/work/5.1-opt sql/sql_show.cc: Auto merged mysql-test/r/information_schema.result: Merge with 5.0-opt. mysql-test/t/information_schema.test: Merge with 5.0-opt.
-rw-r--r--mysql-test/r/information_schema.result13
-rw-r--r--mysql-test/t/information_schema.test28
-rw-r--r--sql/sql_show.cc2
3 files changed, 40 insertions, 3 deletions
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 18864148d29..c5a963c88bb 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1471,11 +1471,22 @@ f6 bigint(20) NO 10
f7 datetime NO NULL
f8 datetime YES 2006-01-01 00:00:00
drop table t1;
-End of 5.0 tests.
show fields from information_schema.table_names;
ERROR 42S02: Unknown table 'table_names' in information_schema
show keys from information_schema.table_names;
ERROR 42S02: Unknown table 'table_names' in information_schema
+USE information_schema;
+SET max_heap_table_size = 16384;
+CREATE TABLE test.t1( a INT );
+SELECT *
+FROM tables ta
+JOIN collations co ON ( co.collation_name = ta.table_catalog )
+JOIN character_sets cs ON ( cs.character_set_name = ta.table_catalog );
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
+DROP TABLE test.t1;
+SET max_heap_table_size = DEFAULT;
+USE test;
+End of 5.0 tests.
select * from information_schema.engines WHERE ENGINE="MyISAM";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
MyISAM DEFAULT Default engine as of MySQL 3.23 with great performance NO NO NO
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 2d8a2b738ee..f0d2bbe2d64 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -1090,8 +1090,6 @@ select column_default from information_schema.columns where table_name= 't1';
show columns from t1;
drop table t1;
---echo End of 5.0 tests.
-
#
# Bug#30079 A check for "hidden" I_S tables is flawed
#
@@ -1099,6 +1097,32 @@ drop table t1;
show fields from information_schema.table_names;
--error 1109
show keys from information_schema.table_names;
+
+#
+# Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY
+#
+USE information_schema;
+SET max_heap_table_size = 16384;
+
+CREATE TABLE test.t1( a INT );
+
+# What we need to create here is a bit of a corner case:
+# We need a star query with information_schema tables, where the first
+# branch of the star join produces zero rows, so that reading of the
+# second branch never happens. At the same time we have to make sure
+# that data for at least the last table is swapped from MEMORY/HEAP to
+# MyISAM. This and only this triggers the bug.
+SELECT *
+FROM tables ta
+JOIN collations co ON ( co.collation_name = ta.table_catalog )
+JOIN character_sets cs ON ( cs.character_set_name = ta.table_catalog );
+
+DROP TABLE test.t1;
+SET max_heap_table_size = DEFAULT;
+USE test;
+
+--echo End of 5.0 tests.
+
#
# Show engines
#
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 6becbe12ed4..5a5cec8d3be 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -5888,9 +5888,11 @@ bool get_schema_tables_result(JOIN *join,
{
result= 1;
join->error= 1;
+ tab->read_record.file= table_list->table->file;
table_list->schema_table_state= executed_place;
break;
}
+ tab->read_record.file= table_list->table->file;
table_list->schema_table_state= executed_place;
}
}