diff options
author | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-02-03 15:09:27 +0100 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@sun.com> | 2010-02-03 15:09:27 +0100 |
commit | b417300c9aadeca5d5a0e45af27c398fc57c34a2 (patch) | |
tree | d58bcb8c3ad79de839df6f0e710cab64a837b2d1 /mysql-test/r/mdl_sync.result | |
parent | c8555bdb35d998e99b6fb568f03c63479ff9272d (diff) | |
download | mariadb-git-b417300c9aadeca5d5a0e45af27c398fc57c34a2.tar.gz |
Bug #50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
failed in open_ltable()
The problem was too restrictive asserts that enforced that
open_ltable() was called without any active HANDLERs, LOCK TABLES
or global read locks.
However, this can happen in several cases when opening system
tables. The assert would, for example, be triggered when drop
function was called from a connection with active HANDLERs as
this would cause open_ltable() to be called for mysql.proc.
The assert could also be triggered when using table-based
general log (mysql.general_log).
This patch removes the asserts since they will be triggered in
several legitimate cases and because the asserts are no longer
relevant due to changes in how locks are released.
The patch also fixes set_needs_thr_lock_abort() that before
ignored its parameter and always set the member variable to TRUE.
Test case added to mdl_sync.test.
Thanks to Dmitry Lenev for help with this bug!
Diffstat (limited to 'mysql-test/r/mdl_sync.result')
-rw-r--r-- | mysql-test/r/mdl_sync.result | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/r/mdl_sync.result b/mysql-test/r/mdl_sync.result index 8d8672377f0..79ba129ee7a 100644 --- a/mysql-test/r/mdl_sync.result +++ b/mysql-test/r/mdl_sync.result @@ -2244,3 +2244,51 @@ FLUSH TABLES WITH READ LOCK; UNLOCK TABLES; # Connection 1 SET DEBUG_SYNC= 'RESET'; +# +# Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null' +# failed in open_ltable() +# +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (i INT); +CREATE TABLE t2 (i INT); +SET @old_general_log= @@global.general_log; +SET @@global.general_log= 1; +SET @old_log_output= @@global.log_output; +SET @@global.log_output= 'TABLE'; +SET @old_sql_log_off= @@session.sql_log_off; +SET @@session.sql_log_off= 1; +# connection: con1 +HANDLER t1 OPEN; +# connection: con3 +SET @@session.sql_log_off= 1; +# connection: con2 +SET DEBUG_SYNC= 'thr_multi_lock_after_thr_lock SIGNAL parked WAIT_FOR go'; +# Sending: +SELECT 1; +# connection: con3 +SET DEBUG_SYNC= 'now WAIT_FOR parked'; +# connection: con1 +# Sending: +SELECT 1; +# connection: con3 +# Sending: +ALTER TABLE t1 ADD COLUMN j INT; +# connection: default +SET DEBUG_SYNC= 'now SIGNAL go'; +# connection: con1 +# Reaping SELECT 1 +1 +1 +HANDLER t1 CLOSE; +# connection: con2 +# Reaping SELECT 1 +1 +1 +# connection: con3 +# Reaping ALTER TABLE t1 ADD COLUMN j INT +# connection: default +DROP TABLE t1, t2; +SET DEBUG_SYNC= 'RESET'; +SET @@global.general_log= @old_general_log; +SET @@global.log_output= @old_log_output; +SET @@session.sql_log_off= @old_sql_log_off; |