List:Commits« Previous MessageNext Message »
From:Alexey Botchkov Date:May 21 2009 12:21pm
Subject:bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834
View as plain text  
#At file:///home/hf/work/mysql_common/43834/ based on revid:alexey.kopytov@stripped

 3311 Alexey Botchkov	2009-05-21
      Bug#43834      Assertion in Natural_join_column::db_name() on an I_S query
         starting with the 6.0 we have 'information_schema' as the db name for
         the information schema tables. So that we need to use is_schema() test
         to check.
      
      per-file comments:
        mysql-test/t/information_schema.test
      Bug#43834      Assertion in Natural_join_column::db_name() on an I_S query
          test case added. Test result should be modified later when this test
          is enabled.
      
        sql/table.cc
      Bug#43834      Assertion in Natural_join_column::db_name() on an I_S query
          use is_schema_db() to check for proper schema table.

    modified:
      mysql-test/t/information_schema.test
      sql/table.cc
=== modified file 'mysql-test/t/information_schema.test'
--- a/mysql-test/t/information_schema.test	2009-05-15 13:45:06 +0000
+++ b/mysql-test/t/information_schema.test	2009-05-21 12:17:56 +0000
@@ -1562,3 +1562,14 @@ disconnect con7;
 # Wait till all disconnects are completed
 --source include/wait_until_count_sessions.inc
 
+#
+# Bug #43834    Assertion in Natural_join_column::db_name() on an I_S query
+#
+
+SELECT *
+FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
+LEFT JOIN INFORMATION_SCHEMA.COLUMNS
+USING (TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME)
+WHERE COLUMNS.TABLE_SCHEMA = 'test'
+AND COLUMNS.TABLE_NAME = 't1';
+

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2009-05-07 20:48:24 +0000
+++ b/sql/table.cc	2009-05-21 12:17:56 +0000
@@ -4035,7 +4035,7 @@ const char *Natural_join_column::db_name
   DBUG_ASSERT(!strcmp(table_ref->db,
                       table_ref->table->s->db.str) ||
               (table_ref->schema_table &&
-               table_ref->table->s->db.str[0] == 0));
+               is_schema_db(table_ref->table->s->db.str)));
   return table_ref->db;
 }
 


Attachment: [text/bzr-bundle] bzr/holyfoot@mysql.com-20090521121756-kvi3g2fy7j4yrvq8.bundle
Thread
bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834Alexey Botchkov21 May
  • Re: bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834Guilhem Bichot16 Jun
    • Re: bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834Alexey Botchkov23 Jun
      • Re: bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834Guilhem Bichot23 Jun
        • Re: bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834Guilhem Bichot23 Jun
          • Re: bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834Alexey Botchkov24 Jun
        • Re: bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834Alexey Botchkov24 Jun