Loading mysql-test/r/information_schema.result +10 −0 Original line number Diff line number Diff line Loading @@ -1269,3 +1269,13 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED tables ALL NULL NULL NULL NULL 2 drop view v1; create table t1 (f1 int(11)); create table t2 (f1 int(11), f2 int(11)); select table_name from information_schema.tables where table_schema = 'test' and table_name not in (select table_name from information_schema.columns where table_schema = 'test' and column_name = 'f3'); table_name t1 t2 drop table t1,t2; mysql-test/t/information_schema.test +12 −0 Original line number Diff line number Diff line Loading @@ -987,4 +987,16 @@ explain select * from v1; explain select * from (select table_name from information_schema.tables) as a; drop view v1; # # Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail # create table t1 (f1 int(11)); create table t2 (f1 int(11), f2 int(11)); select table_name from information_schema.tables where table_schema = 'test' and table_name not in (select table_name from information_schema.columns where table_schema = 'test' and column_name = 'f3'); drop table t1,t2; # End of 5.0 tests. sql/sql_show.cc +1 −0 Original line number Diff line number Diff line Loading @@ -3973,6 +3973,7 @@ bool get_schema_tables_result(JOIN *join) if (is_subselect) // is subselect { table_list->table->file->extra(HA_EXTRA_NO_CACHE); table_list->table->file->extra(HA_EXTRA_RESET_STATE); table_list->table->file->delete_all_rows(); free_io_cache(table_list->table); Loading Loading
mysql-test/r/information_schema.result +10 −0 Original line number Diff line number Diff line Loading @@ -1269,3 +1269,13 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found 2 DERIVED tables ALL NULL NULL NULL NULL 2 drop view v1; create table t1 (f1 int(11)); create table t2 (f1 int(11), f2 int(11)); select table_name from information_schema.tables where table_schema = 'test' and table_name not in (select table_name from information_schema.columns where table_schema = 'test' and column_name = 'f3'); table_name t1 t2 drop table t1,t2;
mysql-test/t/information_schema.test +12 −0 Original line number Diff line number Diff line Loading @@ -987,4 +987,16 @@ explain select * from v1; explain select * from (select table_name from information_schema.tables) as a; drop view v1; # # Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail # create table t1 (f1 int(11)); create table t2 (f1 int(11), f2 int(11)); select table_name from information_schema.tables where table_schema = 'test' and table_name not in (select table_name from information_schema.columns where table_schema = 'test' and column_name = 'f3'); drop table t1,t2; # End of 5.0 tests.
sql/sql_show.cc +1 −0 Original line number Diff line number Diff line Loading @@ -3973,6 +3973,7 @@ bool get_schema_tables_result(JOIN *join) if (is_subselect) // is subselect { table_list->table->file->extra(HA_EXTRA_NO_CACHE); table_list->table->file->extra(HA_EXTRA_RESET_STATE); table_list->table->file->delete_all_rows(); free_io_cache(table_list->table); Loading