Bug #39226 Maria: crash with FLUSH TABLES WITH READ LOCK after LOCK TABLES
Submitted: 3 Sep 2008 20:58 Modified: 9 Jan 2009 15:27
Reporter: Guilhem Bichot Email Updates:
Status: Closed
Category:Server: Maria Severity:S3 (Non-critical)
Version:5.1-maria OS:Linux
Assigned to: Michael Widenius Target Version:6.0-beta
Triage: Triaged: D1 (Critical) / R1 (None/Negligible) / E2 (Low)

[3 Sep 2008 20:58] Guilhem Bichot
Description:
./mtr --mysqld=--default-storage-engine=maria --skip-ndb --force --notimer --mem flush 
mysqltest: At line 91: query 'flush tables with read lock' failed: 2013: Lost connection
to MySQL server during query
mysqld: ma_close.c:74: maria_close: Assertion `share->in_trans == 0' failed.

How to repeat:
./mtr --mysqld=--default-storage-engine=maria --skip-ndb --force --notimer --mem flush
[9 Sep 2008 17:51] Guilhem Bichot
Test case:
create table t1 (c1 int);
create table t2 (c1 int);
create table t3 (c1 int);
lock table t1 read, t2 read, t3 read;
flush tables with read lock;

Bug not repeatable in 6.0, because there the FLUSH gives:
"1192: Can't execute the given command because you have active locked tables or an active
transaction"
[4 Oct 2008 17:37] Michael Widenius
Thank you for your bug report. This issue has been committed to our source repository of
that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available
version, including the bug fix. More information about accessing the source trees is
available at

    http://dev.mysql.com/doc/en/installing-source.html
[6 Oct 2008 9:06] Guilhem Bichot
not yet pushed. When pushed, should go to "queued".
[14 Oct 2008 20:31] Michael Widenius
Pushed in 5.1-maria tree
[26 Oct 2008 22:20] Bugs System
Pushed into 6.0.8-alpha  (revid:monty@mysql.com-20081012100952-h39szt1kgq6j0tj4) (version
source revid:guilhem@mysql.com-20081020191322-i0e65e3k8044kkce) (pib:5)
[9 Jan 2009 15:27] MC Brown
Added a note to the 6.0.8 changelog: 

Using Maria, executing FLUSH TABLES WITH READ LOCK after a LOCK TABLES statement would
lead to a crash.