summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-02-23 16:43:35 +0200
committerMichael Widenius <monty@askmonty.org>2012-02-23 16:43:35 +0200
commit2b625ac3e0b2173df18c69df63af00dd03e8c672 (patch)
tree5678ad5814e95716dfad13db9e83a5fa7813e599 /sql/sql_handler.cc
parentf93da174c514e001fd0af61bc4fba51f9f8e7c9e (diff)
downloadmariadb-git-2b625ac3e0b2173df18c69df63af00dd03e8c672.tar.gz
Fixed lp:933719, "Assertion open_tables == 0 ... " in THD::restore_backup_open_tables_state.
This also fixes a (not likely) crashing bug when forcing a thread that was doing a table lock to re-open it's files, for example by creating a trigger. mysys/thr_lock.c: Added more checking to find wrong locks. Removed one, not needed, parameter to thr_lock sql/lock.cc: Fixed mysql_lock_tables() to retry with new sql_lock if lock fails. This was needed as table may be closed and reopened between retry's and then the old sql_lock will point to stale data. sql/mysql_priv.h: Updated prototype sql/sql_base.cc: Ensure that all tables are closed if opening of system table failes; This fixes the assert in THD::restore_backup_open_tables_state sql/sql_handler.cc: Updated variable type
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index d789957ffa4..4f1c63930d6 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -676,7 +676,7 @@ retry:
/* save open_tables state */
if (handler->lock->lock_count > 0)
{
- bool lock_error;
+ int lock_error;
handler->lock->locks[0]->type= handler->lock->locks[0]->org_type;
lock_error= mysql_lock_tables(thd, handler->lock, 0,