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

BUG#22562 - REPAIR TABLE .. USE_FRM causes server crash on Windows and server

hangs on Linux

If REPAIR TABLE ... USE_FRM is issued for table that is located in different
than default database server crash could happen.

In reopen_name_locked_table take database name from table_list (user specified
or default database) instead of from thd (default database).

Affects 4.1 only.


mysql-test/r/repair.result:
  A test case for BUG#22562.
mysql-test/t/repair.test:
  A test case for BUG#22562.
sql/sql_base.cc:
  In reopen_name_locked_table take database name from table_list (user specified
  or default database) instead of from thd (default database).
This commit is contained in:
unknown
2006-10-11 20:34:20 +05:00
parent 6abdffe4f6
commit 31754c57bd
3 changed files with 18 additions and 1 deletions

View File

@ -821,7 +821,7 @@ TABLE *reopen_name_locked_table(THD* thd, TABLE_LIST* table_list)
if (!(table = table_list->table))
DBUG_RETURN(0);
char* db = thd->db ? thd->db : table_list->db;
char *db= table_list->db;
char* table_name = table_list->real_name;
char key[MAX_DBKEY_LENGTH];
uint key_length;