Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail

additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
parent d9ae9ce5
......@@ -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;
......@@ -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.
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment