1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for dropping a table with frm file consisting of "junk"

This commit is contained in:
msvensson@neptunus.mysql.com
2005-10-24 15:05:06 +02:00
parent 0647d280b3
commit bb15425235
2 changed files with 9 additions and 8 deletions

View File

@ -273,7 +273,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
*(end=fn_ext(path))=0; // Remove extension for delete
error= ha_delete_table(thd, table_type, path, table->table_name,
!dont_log_query);
if ((error == ENOENT || error == HA_ERR_NO_SUCH_TABLE) && if_exists)
if ((error == ENOENT || error == HA_ERR_NO_SUCH_TABLE) &&
(if_exists || table_type == DB_TYPE_UNKNOWN))
error= 0;
if (error == HA_ERR_ROW_IS_REFERENCED)
{