mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
row0mysql.c:
If one tries to drop an InnoDB table without an .ibd file, print to .err log that we DID remove the table from the internal data dictionary of InnoDB, and return DB_SUCCESS so that MySQL will delete the .frm file; the drawback in this is that then DROP TABLE returns success, and the user is not alerted; maybe it could return a warning
This commit is contained in:
parent
edc4b65d5c
commit
0543320240
1 changed files with 15 additions and 3 deletions
|
@ -1585,7 +1585,7 @@ row_create_table_for_mysql(
|
|||
"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 moving the .frm file to the current database.\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"
|
||||
|
@ -2546,7 +2546,13 @@ row_drop_table_for_mysql(
|
|||
name_or_path,
|
||||
is_path,
|
||||
FALSE, TRUE)) {
|
||||
err = DB_ERROR;
|
||||
err = DB_SUCCESS;
|
||||
|
||||
fprintf(stderr,
|
||||
"InnoDB: We removed now the InnoDB internal data dictionary entry\n"
|
||||
"InnoDB: of table ");
|
||||
ut_print_name(stderr, trx, name);
|
||||
fprintf(stderr, ".\n");
|
||||
|
||||
goto funct_exit;
|
||||
}
|
||||
|
@ -2554,6 +2560,12 @@ row_drop_table_for_mysql(
|
|||
success = fil_delete_tablespace(space_id);
|
||||
|
||||
if (!success) {
|
||||
fprintf(stderr,
|
||||
"InnoDB: We removed now the InnoDB internal data dictionary entry\n"
|
||||
"InnoDB: of table ");
|
||||
ut_print_name(stderr, trx, name);
|
||||
fprintf(stderr, ".\n");
|
||||
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr,
|
||||
" InnoDB: Error: not able to delete tablespace %lu of table ",
|
||||
|
@ -2993,7 +3005,7 @@ row_rename_table_for_mysql(
|
|||
"InnoDB: dropped automatically when the queries end.\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 moving the .frm file to the current database.\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", stderr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue