diff options
author | monty@hundin.mysql.fi <> | 2002-06-04 22:59:12 +0300 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-06-04 22:59:12 +0300 |
commit | b0aa96dd81a2212dbf7f7ae33bd49f7408ca73b0 (patch) | |
tree | 3db4b964ebda2b7b95ab893e1d18b4dacf9415aa /sql/sql_delete.cc | |
parent | 8cba72fe1f106049b14167898f8aea2a15519065 (diff) | |
download | mariadb-git-b0aa96dd81a2212dbf7f7ae33bd49f7408ca73b0.tar.gz |
Fixed mutex problem in TRUNCATE TABLE
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index c8ed74c9bca..fd8ef4fb123 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -573,9 +573,15 @@ end: } send_ok(&thd->net); // This should return record count } + VOID(pthread_mutex_lock(&LOCK_open)); unlock_table_name(thd, table_list); + VOID(pthread_mutex_unlock(&LOCK_open)); } else if (error) + { + VOID(pthread_mutex_lock(&LOCK_open)); unlock_table_name(thd, table_list); + VOID(pthread_mutex_unlock(&LOCK_open)); + } DBUG_RETURN(error ? -1 : 0); } |