Bug #39395 Maria: ma_extra.c:286: maria_extra: Assertion `share->reopen == 1' failed
Submitted: 11 Sep 2008 15:52 Modified: 9 Jan 16:29
Reporter: Guilhem Bichot
Status: Closed
Category:Server: Maria Severity:S3 (Non-critical)
Version:6.0-bzr OS:Linux
Assigned to: Bugs System Target Version:6.0-beta
Triage: Triaged: D2 (Serious) / R1 (None/Negligible) / E2 (Low)

[11 Sep 2008 15:52] Guilhem Bichot
Description:
Seems to happen when dropping a locked table. Happens in:
./mtr --mem --mysqld=--default-storage-engine=maria lock
and same for test "lock_multi", "tablelock"

How to repeat:
run above tests
[26 Sep 2008 12:28] Michael Widenius
The test works in 5.1-Maria. Will verify if this is a new bug in 6.0-maria after the next
merge of 5.1-Maria to 6.0
[22 Oct 2008 1:22] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/56769

2746 Michael Widenius	2008-10-22
      Fix for bug#39395 Maria: ma_extra.c:286: maria_extra: Assertion `share->reopen ==
1' failed
[22 Oct 2008 1:24] Michael Widenius
This was depending of 2 problems:
- The MySQL server called handler::extra(PREPARE_FOR_REOPEN) while table was opened
multiple times. This was not officially supported by the handler interface.
I made a temporary fix by removing the check in maria::extra() that verifies if the table
is correctly used.
- Race condition in wait_while_table_is_used() where a table used by another connection
could be forced closed, but there was no protection against the other thread re-opening
the table and trying to lock it again before the table was name locked by original
thread.
Pushed in the mysql-6.0-maria tree
[26 Oct 2008 23:20] Bugs System
Pushed into 6.0.8-alpha  (revid:monty@mysql.com-20081021232323-izj0ud5covlylsl6) (version
source revid:monty@mysql.com-20081021232323-izj0ud5covlylsl6) (pib:5)
[9 Jan 16:29] MC Brown
Added a note to the 6.0.8 changelog: 

Dropping a locked Maria table leads to an assertion failure