List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:June 25 2010 8:01am
Subject:bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:3443)
Bug#54422
View as plain text  
#At file:///home/gluh/MySQL/mysql-5.1-bugteam/ based on revid:ramil@stripped

 3443 Sergey Glukhov	2010-06-25
      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.

    modified:
      mysql-test/r/information_schema.result
      mysql-test/t/information_schema.test
      sql/sql_show.cc
=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2010-01-21 15:14:10 +0000
+++ b/mysql-test/r/information_schema.result	2010-06-25 08:01:47 +0000
@@ -1747,4 +1747,14 @@ COUNT(*)
 DROP USER nonpriv;
 DROP TABLE db1.t1;
 DROP DATABASE db1;
+
+Bug#54422 query with = 'variables'
+
+CREATE TABLE variables(f1 INT);
+SELECT COLUMN_DEFAULT, TABLE_NAME
+FROM INFORMATION_SCHEMA.COLUMNS
+WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables';
+COLUMN_DEFAULT	TABLE_NAME
+NULL	variables
+DROP TABLE variables;
 End of 5.1 tests.

=== modified file 'mysql-test/t/information_schema.test'
--- a/mysql-test/t/information_schema.test	2010-01-21 15:14:10 +0000
+++ b/mysql-test/t/information_schema.test	2010-06-25 08:01:47 +0000
@@ -1445,6 +1445,15 @@ DROP USER nonpriv;
 DROP TABLE db1.t1;
 DROP DATABASE db1;
 
+--echo
+--echo Bug#54422 query with = 'variables'
+--echo
+
+CREATE TABLE variables(f1 INT);
+SELECT COLUMN_DEFAULT, TABLE_NAME
+FROM INFORMATION_SCHEMA.COLUMNS
+WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'variables';
+DROP TABLE variables;
 
 --echo End of 5.1 tests.
 

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-06-10 20:45:22 +0000
+++ b/sql/sql_show.cc	2010-06-25 08:01:47 +0000
@@ -2921,7 +2921,9 @@ make_table_name_list(THD *thd, List<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;


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20100625080147-fxzvbn2aa755xner.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:3443)Bug#54422Sergey Glukhov25 Jun