List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:June 16 2009 2:29pm
Subject:Re: bzr commit into mysql-6.0-bugteam branch (holyfoot:3311) Bug#43834
View as plain text  
Hello Holyfoot,

Alexey Botchkov a écrit, Le 21.05.2009 14:21:
> #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.

Do you know what revision introduced this change?
If we knew, we could maybe check for other places which need an update.

> 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.

Ok, as long as the added test portion does not crash anymore :)

> === 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;
>  }

There is also, in table.cc:

const char *Field_iterator_table_ref::get_db_name()
{
   if (table_ref->view)
     return table_ref->view_db.str;
   else if (table_ref->is_natural_join)
     return natural_join_it.column_ref()->db_name();

   /*
     Test that TABLE_LIST::db is the same as TABLE_SHARE::db to
     ensure consistency. An exception are I_S schema tables, which
     are inconsistent in this respect.
   */
   DBUG_ASSERT(!strcmp(table_ref->db, table_ref->table->s->db.str) ||
               (table_ref->schema_table &&
                table_ref->table->s->db.str[0] == 0));

   return table_ref->db;
}

which probably has the same bug (I grepped for "str[0]" in sql/). Could 
you please create a test query for this place (hopefully triggering the 
assertion), and fix this place?

Thanks!

-- 
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com

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