summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2010-06-25 12:01:47 +0400
committerSergey Glukhov <Sergey.Glukhov@sun.com>2010-06-25 12:01:47 +0400
commit2a86768e9e1ca85ec4380e29df72fbdcea34a85d (patch)
tree5e2013e29e8356db0cb122d37e6c5e253fd7b1d7 /sql
parenta515a9ed230a2eecd99b35241c6c4001ed5fd8df (diff)
downloadmariadb-git-2a86768e9e1ca85ec4380e29df72fbdcea34a85d.tar.gz
Bug#54422 query with = 'variables'
During creation of the table list of processed tables hidden I_S table 'VARIABLES' is erroneously added into the table list. it leads to ER_UNKNOWN_TABLE error in TABLE_LIST::add_table_to_list() function. The fix is to skip addition of hidden I_S tables into the table list. mysql-test/r/information_schema.result: test case mysql-test/t/information_schema.test: test case sql/sql_show.cc: The fix is to skip addition of hidden I_S tables into the table list.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_show.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index f634c149fd9..33abf356718 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2921,7 +2921,9 @@ make_table_name_list(THD *thd, List<LEX_STRING> *table_names, LEX *lex,
{
if (with_i_schema)
{
- if (find_schema_table(thd, lookup_field_vals->table_value.str))
+ ST_SCHEMA_TABLE *schema_table=
+ find_schema_table(thd, lookup_field_vals->table_value.str);
+ if (schema_table && !schema_table->hidden)
{
if (table_names->push_back(&lookup_field_vals->table_value))
return 1;