mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Applying InnoDB Plugin 1.0.6 snapshot, part 8. Fixes BUG#48782
applied revisions: r6185, r6186, r6189, r6194 r6185 - only code changes incorporated, changesets which change innodb tests in the main mysql suite are discarded r61889 - Fixes BUG#48782 Detailed revision comments: r6185 | marko | 2009-11-17 16:44:20 +0200 (Tue, 17 Nov 2009) | 16 lines branches/zip: Report duplicate table names to the client connection, not to the error log. This change will allow innodb-index.test to be re-enabled. It was previously disabled, because mysql-test-run does not like output in the error log. row_create_table_for_mysql(): Do not output anything to the error log when reporting DB_DUPLICATE_KEY. Let the caller report the error. Add a TODO comment that the dict_table_t object is apparently not freed when an error occurs. create_table_def(): Convert InnoDB table names to the character set of the client connection for reporting. Use my_error(ER_WRONG_COLUMN_NAME) for reporting reserved column names. Report my_error(ER_TABLE_EXISTS_ERROR) when row_create_table_for_mysql() returns DB_DUPLICATE_KEY. rb://206 r6186 | vasil | 2009-11-17 16:48:14 +0200 (Tue, 17 Nov 2009) | 4 lines branches/zip: Add ChangeLog entry for r6185. r6189 | marko | 2009-11-18 11:36:18 +0200 (Wed, 18 Nov 2009) | 5 lines branches/zip: ha_innobase::add_index(): When creating the primary key and the table is being locked by another transaction, do not attempt to drop the table. (Bug #48782) Approved by Sunny Bains over IM r6194 | vasil | 2009-11-19 09:24:45 +0200 (Thu, 19 Nov 2009) | 5 lines branches/zip: Increment version number from 1.0.5 to 1.0.6 since 1.0.5 was just released by MySQL and we will soon release 1.0.6.
This commit is contained in:
@ -1880,6 +1880,8 @@ err_exit:
|
||||
if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
|
||||
trx->error_state = DB_SUCCESS;
|
||||
trx_general_rollback_for_mysql(trx, NULL);
|
||||
/* TO DO: free table? The code below will dereference
|
||||
table->name, though. */
|
||||
}
|
||||
|
||||
switch (err) {
|
||||
@ -1898,31 +1900,6 @@ err_exit:
|
||||
break;
|
||||
|
||||
case DB_DUPLICATE_KEY:
|
||||
ut_print_timestamp(stderr);
|
||||
fputs(" InnoDB: Error: table ", stderr);
|
||||
ut_print_name(stderr, trx, TRUE, table->name);
|
||||
fputs(" already exists in InnoDB internal\n"
|
||||
"InnoDB: data dictionary. Have you deleted"
|
||||
" the .frm file\n"
|
||||
"InnoDB: and not used DROP TABLE?"
|
||||
" Have you used DROP DATABASE\n"
|
||||
"InnoDB: for InnoDB tables in"
|
||||
" MySQL version <= 3.23.43?\n"
|
||||
"InnoDB: See the Restrictions section"
|
||||
" of the InnoDB manual.\n"
|
||||
"InnoDB: You can drop the orphaned table"
|
||||
" inside InnoDB by\n"
|
||||
"InnoDB: creating an InnoDB table with"
|
||||
" the same name in another\n"
|
||||
"InnoDB: database and copying the .frm file"
|
||||
" to the current database.\n"
|
||||
"InnoDB: Then MySQL thinks the table exists,"
|
||||
" and DROP TABLE will\n"
|
||||
"InnoDB: succeed.\n"
|
||||
"InnoDB: You can look for further help from\n"
|
||||
"InnoDB: " REFMAN "innodb-troubleshooting.html\n",
|
||||
stderr);
|
||||
|
||||
/* We may also get err == DB_ERROR if the .ibd file for the
|
||||
table already exists */
|
||||
|
||||
|
Reference in New Issue
Block a user