1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

* don't use 1-8 numbers for open_table_error codes, use an enum.

* print "table doesn't exist in engine" when a table doesn't exist in the engine,
  instead of "file not found" (if no file was involved)
* print a complete filename that cannot be found ('t1.MYI', not 't1')
* it's not an error for a DROP if a table doesn't exist in the engine (or some table
  files cannot be found) - if the DROP succeeded regardless
This commit is contained in:
Sergei Golubchik
2013-04-09 15:34:17 +02:00
parent 5ad68a0d2f
commit 163882665e
29 changed files with 196 additions and 216 deletions

View File

@ -81,6 +81,7 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
HA_CHECK_OPT *check_opt)
{
int error= 0;
enum open_frm_error not_used;
TABLE tmp_table, *table;
TABLE_LIST *pos_in_locked_tables= 0;
TABLE_SHARE *share;
@ -129,7 +130,7 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
hash_value= my_calc_hash(&table_def_cache, (uchar*) key, key_length);
mysql_mutex_lock(&LOCK_open);
share= get_table_share(thd, table_list, key, key_length,
FRM_READ_TABLE_ONLY, &error, hash_value);
FRM_READ_TABLE_ONLY, &not_used, hash_value);
mysql_mutex_unlock(&LOCK_open);
if (share == NULL)
DBUG_RETURN(0); // Can't open frm file