1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

BUG#8547: Wrong errormessage when dropping table that does not exist in NDB

- Added tescases
 - Added handling of HA_ERR_NO_SUCH_TABLE in mysql_rm_table_part2 so that 
   error messages now are consistent


mysql-test/r/ndb_autodiscover.result:
  Added tess for dropping tables that does not exists in engine
mysql-test/t/ndb_autodiscover.test:
  Added tess for dropping tables that does not exists in engine
sql/ha_ndbcluster.cc:
  Updated delete_table and drop_table to retrn HA_ERR_NO_SUCH_TABLE if table was not found in engine.
  Clear error after calling mysql_rm_table_part2 from mysql_find_files
sql/sql_table.cc:
  Added handling of the case when table does not exist in storage engine but on disk as .frm file.
This commit is contained in:
unknown
2005-02-17 14:22:44 +01:00
parent 841a9c3885
commit 329076db74
4 changed files with 79 additions and 25 deletions

View File

@@ -249,6 +249,21 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
if (!(error=my_delete(path,MYF(MY_WME))))
some_tables_deleted=1;
}
if (error == HA_ERR_NO_SUCH_TABLE)
{
/* The table did not exist in engine */
if (if_exists)
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_BAD_TABLE_ERROR, ER(ER_BAD_TABLE_ERROR),
table->table_name);
error= 0;
}
/* Delete the table definition file */
strmov(end,reg_ext);
if (!(my_delete(path,MYF(MY_WME))))
some_tables_deleted=1;
}
}
if (error)
{