Bug #43220 | Test backup_datatypes fails on powermacg5 platform. | ||
---|---|---|---|
Submitted: | 26 Feb 2009 10:33 | Modified: | 25 Jun 2009 22:15 |
Reporter: | Rafal Somla | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Backup | Severity: | S3 (Non-critical) |
Version: | 6.0 | OS: | Any |
Assigned to: | Jørgen Løland | CPU Architecture: | Any |
Tags: | pushbuild failure |
[26 Feb 2009 10:33]
Rafal Somla
[5 Mar 2009 15:30]
Jørgen Løland
This might be a duplicate of bug#43363
[5 Mar 2009 15:36]
Jørgen Løland
Could also be related to bug#39063
[2 Apr 2009 11:05]
Jørgen Løland
The fixes to the bugs above did not fix the problem.
[3 Apr 2009 9:41]
Jørgen Løland
The error occurs because the table has not been removed from the table definition cache. The error comes from sql_table.cc around line 3599: ------------------- /* We don't assert here, but check the result, because the table could be in the table definition cache and in the same time the .frm could be missing from the disk, in case of manual intervention which deletes the .frm file. The user has to use FLUSH TABLES; to clear the cache. Then she could create the table. This case is pretty obscure and therefore we don't introduce a new error message only for it. */ if (get_cached_table_share(db, alias)) { my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name); goto unlock_and_end; } ------------- Adding FLUSH TABLES after dropping the database in the backup_datatypes.test file solves the problem for backup. This seems to be a bug in the server code.
[3 Apr 2009 11:51]
Jørgen Løland
IRC with Dmitry Lenev: The server APIs for openening and locking tables (probably others as well) expect table names in a normalized form. This means that if lower_case_table_names>0, the APIs expect *lower case table names*. Backup, however, gets and uses the table names found in INFORMATION_SCHEMA.TABLES. If lctn=2, the names there may contain upper case characters. The problem in this bug is that backup does not convert names to lower case before calling these server functions. The server functions in question take the table names in form of TABLE_LIST, so we need to check all places in the backup code that creates such lists and do the same as st_select_lex::add_table_to_list does: if (lower_case_table_names && table->table.length) table->table.length= my_casedn_str(files_charset_info, table->table.str);
[29 Apr 2009 14:11]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/73029 2698 Jorgen Loland 2009-04-29 Bug#43220 - Test backup_datatypes fails on powermacg5 platform. The server APIs for openening and locking tables et al. expect table names in a normalized form. This means that if lower_case_table_names>0, the APIs expect lower case table names. Backup, however, gets and uses the table names found in INFORMATION_SCHEMA.TABLES. If lctn=2, the names there may contain upper case characters. With this patch, backup normalizes table names used internally. I.e., if lctn>0, table names are represented in lower case where backup/restore calls server code. @ sql/backup/backup_aux.h Make the table names backup/restore uses to call server code lower case if lower_case_table_names is set.
[29 Apr 2009 15:33]
Chuck Bell
Patch approved. Works on Windows.
[30 Apr 2009 6:59]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/73075 2702 Jorgen Loland 2009-04-30 Bug#43220 - Test backup_datatypes fails on powermacg5 platform. The server APIs for openening and locking tables et al. expect table an database names in a normalized form. This means that if lower_case_table_names>0, the APIs expect lower case table/db names. Backup, however, gets and uses the names found in INFORMATION_SCHEMA.TABLES. If lctn=2, the names there may contain upper case characters. With this patch, backup normalizes table and database names used internally. I.e., if lctn>0, table and database names are represented in lower case where backup/restore calls server code. @ mysql-test/suite/backup/t/backup_datatypes.test Reenable test on powermac @ sql/backup/backup_aux.h Make the table and database names backup/restore uses to call server code lower case if lower_case_table_names is set.
[30 Apr 2009 7:41]
Rafal Somla
Good to push.
[6 May 2009 9:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/73464 2804 Jorgen Loland 2009-05-06 BUG#43220 - Test backup_datatypes fails on powermacg5 platform. The previous patch for this bug did not solve the issue. Disabling backup_datatypes.test on powermac platform. @ mysql-test/suite/backup/t/backup_datatypes.test Test disabled on powermac platform due to bug 43220.
[8 May 2009 7:08]
Jørgen Løland
The committed patch fixed a bug in the backup code, only to uncover a new bug in the server. I created BUG#44738 to track that issue. Most likely, the only thing that remains on this bug is to reenable the test on powermacg5 once BUG#44738 is fixed.
[27 May 2009 13:59]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/75055 2816 Jorgen Loland 2009-05-27 Bug#43220 - Test backup_datatypes fails on powermacg5 platform. Followup patch enabling backup_datatypes on powermacg5. @ mysql-test/suite/backup/t/backup_datatypes.test Enable test on powermacg5.
[25 Jun 2009 14:39]
Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090625143727-9gqcfzh7ajuk66oj) (version source revid:jorgen.loland@sun.com-20090527133405-du5dbxqvkak51sdl) (merge vers: 6.0.12-alpha) (pib:11)
[25 Jun 2009 22:15]
Paul DuBois
Test case changes. No changelog entry needed.