diff options
author | unknown <gluh@mysql.com/eagle.(none)> | 2007-02-01 19:12:45 +0400 |
---|---|---|
committer | unknown <gluh@mysql.com/eagle.(none)> | 2007-02-01 19:12:45 +0400 |
commit | a30830460794651c0e9fc5ec4779cf77680514ee (patch) | |
tree | 6bb271cb6728b68daf96b666a13e9cbd5484711e | |
parent | 1ff126e9353c85d7b56f0555fb85bfae9f756e04 (diff) | |
download | mariadb-git-a30830460794651c0e9fc5ec4779cf77680514ee.tar.gz |
Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail
additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
mysql-test/r/information_schema.result:
test result
mysql-test/t/information_schema.test:
test case
sql/sql_show.cc:
additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
-rw-r--r-- | mysql-test/r/information_schema.result | 10 | ||||
-rw-r--r-- | mysql-test/t/information_schema.test | 12 | ||||
-rw-r--r-- | sql/sql_show.cc | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 21d7bfb1b21..b93a4c28849 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -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; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 623ccee49e4..d1dd485e21c 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -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. diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 21a5ead90af..23059ac545a 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -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); |