#At file:///export/home/x/mysql-5.5-runtime-bug56595/ based on revid:jon.hauglid@stripped
3134 Jon Olav Hauglid 2010-09-08
Bug #56595 RENAME TABLE causes assert on OS X
The problem was that RENAME TABLE caused an assert if the system variable
lower_case_table_names was 2 (default on Mac OS X) and the old table name
was given in upper case. This was also seen in the lowercase_table2.test.
The assert checks that an exclusive metadata lock is held by the connection
trying to do RENAME TABLE - specificially during updates of triggers.
The assert was triggered since the check is case sensitive and the lock
was held on the lower case table name.
This patch fixes the problem by making sure the lower case version of the
table name is used for Table_triggers_list::change_table_name() and thus
also the metadata lock check, similar to what is already done for
ALTER TABLE ... RENAME.
No test case added since this problem is already covered by
lowercase_table2.test
modified:
sql/sql_rename.cc
=== modified file 'sql/sql_rename.cc'
--- a/sql/sql_rename.cc 2010-08-10 11:16:44 +0000
+++ b/sql/sql_rename.cc 2010-09-08 08:31:27 +0000
@@ -284,7 +284,7 @@ do_rename(THD *thd, TABLE_LIST *ren_tabl
new_db, new_alias, 0)))
{
if ((rc= Table_triggers_list::change_table_name(thd, ren_table->db,
- old_alias,
+ ren_table->table_name,
new_db,
new_alias)))
{
Attachment: [text/bzr-bundle] bzr/jon.hauglid@oracle.com-20100908083127-mypz1g03ly9htbf0.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-runtime branch (jon.hauglid:3134) Bug#56595 | Jon Olav Hauglid | 8 Sep |