List:Commits« Previous MessageNext Message »
From:Jon Olav Hauglid Date:September 16 2010 9:32am
Subject:Re: bzr commit into mysql-5.5-runtime branch (jon.hauglid:3137) Bug#56595
View as plain text  
On 09/16/2010 10:22 AM, Dmitry Lenev wrote:
> Hello Jon Olav!

Hello!

>> === modified file 'sql/sql_table.cc'
>> --- a/sql/sql_table.cc	2010-09-03 07:42:51 +0000
>> +++ b/sql/sql_table.cc	2010-09-15 09:08:18 +0000
>> @@ -6555,8 +6556,8 @@ bool mysql_alter_table(THD *thd,char *ne
>>              (need_copy_table != ALTER_TABLE_METADATA_ONLY ||
>>               mysql_rename_table(save_old_db_type, db, table_name, new_db,
>>                                  new_alias, NO_FRM_RENAME))&&
>> -           Table_triggers_list::change_table_name(thd, db, table_name,
>> -                                                  new_db, new_alias)))
>> +            Table_triggers_list::change_table_name(thd, db, alias, table_name,
>> +                                                   new_db, new_alias)))
>
> I suspect that alignment of the above code is wrong.
>
> Please check.

Technically it's the code above my code that's indented wrong :-)
But I've realigned my changes to make the diff smaller.

>> -  DBUG_ASSERT(my_strcasecmp(table_alias_charset, db, new_db) ||
>> -              my_strcasecmp(table_alias_charset, old_table, new_table));
>> +  DBUG_ASSERT((lower_case_table_names&&
>> +               (my_strcasecmp(table_alias_charset, db, new_db) ||
>> +                my_strcasecmp(table_alias_charset, old_table, new_table))) ||
>> +              (!lower_case_table_names&&
>> +               (strcmp(db, new_db) || strcmp(old_alias, new_table))));
>
> Sorry. It seems that I have misled you with this assert. When
> lower_case_table_name is 0 table_alias_charset points to
> my_charset_bin and thus in the original assert case-sensitive
> comparison is performed. So original assert is correct.
>
> So I think you should revert this change.

Done.

> Also probably it makes sense to add test case which will do
> "RENAME TABLE t1 TO T1" to lowercase_fs_off.test.
> What do you think?

Sure. I added this test:
  CREATE TABLE t1(a INT);
  CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a= 1;
  RENAME TABLE t1 TO T1;
  ALTER TABLE T1 RENAME t1;
  DROP TABLE t1;

Thanks!

--- Jon Olav
Thread
bzr commit into mysql-5.5-runtime branch (jon.hauglid:3137) Bug#56595Jon Olav Hauglid15 Sep
  • Re: bzr commit into mysql-5.5-runtime branch (jon.hauglid:3137)Bug#56595Dmitry Lenev16 Sep
    • Re: bzr commit into mysql-5.5-runtime branch (jon.hauglid:3137) Bug#56595Jon Olav Hauglid16 Sep