summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-01-18 17:36:20 -0700
committerunknown <sasha@mysql.sashanet.com>2001-01-18 17:36:20 -0700
commit1ad779d47c5e7b1e4e044053f9fa8bca71ac9e2b (patch)
tree6be6f043d9869e97211581cece15de29cc37352f /sql/sql_table.cc
parentc862fa36467651ef3e3cb3acad61e42fc0b3e07c (diff)
downloadmariadb-git-1ad779d47c5e7b1e4e044053f9fa8bca71ac9e2b.tar.gz
fixed buffer overrun in resolve_stack_dump
fixes for restore table test case for backup/restore extra/resolve_stack_dump.c: fixed buffer overrun mysql-test/t/rpl000004.test: updated load table from master test case sql/ha_myisam.cc: verbose error messages during backup table, very silent repair on restore sql/sql_table.cc: fixed bugs in restore table
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index bdafaf5bddd..68d2ab062c6 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -828,6 +828,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
if(lock_retcode && wait_for_locked_table_names(thd, table))
{
+ unlock_table_name(thd, table);
pthread_mutex_unlock(&LOCK_open);
return -1;
}
@@ -838,6 +839,7 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
reg_ext, 4),
MYF(MY_WME)))
{
+ unlock_table_name(thd, table);
return send_check_errmsg(thd, table, "restore",
"Failed copying .frm file");
}
@@ -848,8 +850,9 @@ static int prepare_for_restore(THD* thd, TABLE_LIST* table)
if(generate_table(thd, table, 0))
{
- thd->net.no_send_ok = save_no_send_ok;
- return send_check_errmsg(thd, table, "restore",
+ unlock_table_name(thd, table);
+ thd->net.no_send_ok = save_no_send_ok;
+ return send_check_errmsg(thd, table, "restore",
"Failed generating table from .frm file");
}
@@ -906,7 +909,8 @@ static int mysql_admin_table(THD* thd, TABLE_LIST* tables,
// now we should be able to open the partially restored table
// to finish the restore in the handler later on
- table->table = reopen_name_locked_table(thd, table);
+ if(!(table->table = reopen_name_locked_table(thd, table)))
+ unlock_table_name(thd, table);
}
if (!table->table)