Bug #56777 | RENAME TABLE of upper case table hits DBUG_ASSERT under lower_case_table_names=2 | ||
---|---|---|---|
Submitted: | 14 Sep 2010 16:23 | Modified: | 23 Sep 2010 11:51 |
Reporter: | Mattias Jonsson | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S2 (Serious) |
Version: | 5.5 | OS: | Any (Windows, Mac OS X) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | regression |
[14 Sep 2010 16:23]
Mattias Jonsson
[14 Sep 2010 16:52]
Valeriy Kravchuk
Verified with current mysql-5.5 tree on Mac OS X 10.5.x also: ... Version: '5.5.7-m3-debug-log' socket: '/Users/openxs/dbs/5.5/mysql-test/var/tmp/mysqld.1.sock' port: 13000 Source distribution Assertion failed: (thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, old_table, MDL_EXCLUSIVE)), function change_table_name, file sql_trigger.cc, line 1911. 100914 19:48:31 - mysqld got signal 6 ;
[23 Sep 2010 11:45]
Mattias Jonsson
main.lowercase_table2 test also hits this bug -> not related to partitioning. The problem is Table_triggers_list::change_table_name() which have an assertion that uses the table->alias (not folded to lower case) instead of table->table_name (folded according to lower_case_table_names) which makes the lookup in thd->mdl_context.is_lock_owner() fail since it cannot find any EXCLUSIVE lock with the uppercase name (since it is locked with lower case name, according to lower_case_table_names). Fix is probably to include both table_name and alias in change_table_name (just like do_rename) and use the table_name for the lock assertion.
[23 Sep 2010 11:51]
Mattias Jonsson
Duplicate of bug#56595.