summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2002-09-01 18:17:33 +0000
committerunknown <serg@serg.mysql.com>2002-09-01 18:17:33 +0000
commit9af502edd2439e5fb9e77fd99e88d74990c67a52 (patch)
tree221c0a8213fe5d0ecd608b305c39454ada823af3 /sql
parentb12cc1ab205b8421eae9f608f09dce165f75bbb5 (diff)
downloadmariadb-git-9af502edd2439e5fb9e77fd99e88d74990c67a52.tar.gz
protected close_cached_table() call in REPAIR ... USE_FRM with a mutex
test for REPAIR ... USE_FRM added sql/sql_table.cc: protected close_cached_table() call in REPAIR ... USE_FRM with a mutex
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_table.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 0ff0a6b3ac8..9194c3cd8bc 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -972,7 +972,9 @@ static int prepare_for_repair(THD* thd, TABLE_LIST* table,
fn_format(from, from, "", MI_NAME_DEXT, 4);
sprintf(tmp,"%s-%lx_%lx", from, current_pid, thd->thread_id);
+ pthread_mutex_lock(&LOCK_open);
close_cached_table(thd,table->table);
+ pthread_mutex_unlock(&LOCK_open);
if (lock_and_wait_for_table_name(thd,table))
DBUG_RETURN(-1);