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
parent edc4b65d
...@@ -1585,7 +1585,7 @@ row_create_table_for_mysql( ...@@ -1585,7 +1585,7 @@ row_create_table_for_mysql(
"InnoDB: See the Restrictions section of the InnoDB manual.\n" "InnoDB: See the Restrictions section of the InnoDB manual.\n"
"InnoDB: You can drop the orphaned table inside InnoDB by\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: 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: Then MySQL thinks the table exists, and DROP TABLE will\n"
"InnoDB: succeed.\n" "InnoDB: succeed.\n"
"InnoDB: You can look for further help from\n" "InnoDB: You can look for further help from\n"
...@@ -2546,7 +2546,13 @@ row_drop_table_for_mysql( ...@@ -2546,7 +2546,13 @@ row_drop_table_for_mysql(
name_or_path, name_or_path,
is_path, is_path,
FALSE, TRUE)) { 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; goto funct_exit;
} }
...@@ -2554,6 +2560,12 @@ row_drop_table_for_mysql( ...@@ -2554,6 +2560,12 @@ row_drop_table_for_mysql(
success = fil_delete_tablespace(space_id); success = fil_delete_tablespace(space_id);
if (!success) { 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); ut_print_timestamp(stderr);
fprintf(stderr, fprintf(stderr,
" InnoDB: Error: not able to delete tablespace %lu of table ", " InnoDB: Error: not able to delete tablespace %lu of table ",
...@@ -2993,7 +3005,7 @@ row_rename_table_for_mysql( ...@@ -2993,7 +3005,7 @@ row_rename_table_for_mysql(
"InnoDB: dropped automatically when the queries end.\n" "InnoDB: dropped automatically when the queries end.\n"
"InnoDB: You can drop the orphaned table inside InnoDB by\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: 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: Then MySQL thinks the table exists, and DROP TABLE will\n"
"InnoDB: succeed.\n", stderr); "InnoDB: succeed.\n", stderr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment