Bug #39395 Maria: ma_extra.c:286: maria_extra: Assertion `share->reopen == 1' failed
Submitted: 11 Sep 2008 13:52 Modified: 8 Mar 2010 9:20
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S3 (Non-critical)
Version:6.0-bzr OS:Linux
Assigned to: CPU Architecture:Any

[11 Sep 2008 13: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 10: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
[21 Oct 2008 23: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
[21 Oct 2008 23: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 22: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 2009 15:29] MC Brown
Added a note to the 6.0.8 changelog: 

Dropping a locked Maria table leads to an assertion failure
[11 Dec 2009 11:08] 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/93651

3029 Konstantin Osipov	2009-12-11
      Partial backport of:
      ----------------------------------------------------
      2736.2.10 Michael Widenius	2008-10-22
      Fix for bug#39395 Maria: ma_extra.c:286: maria_extra: 
      Assertion `share->reopen == 1' failed
     @ sql/sql_base.cc
        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.
[16 Feb 2010 16:49] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100216101445-2ofzkh48aq2e0e8o) (version source revid:kostja@sun.com-20091211154405-c9yhiewr9o5d20rq) (merge vers: 6.0.14-alpha) (pib:16)
[16 Feb 2010 16:59] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100216101208-33qkfwdr0tep3pf2) (version source revid:kostja@sun.com-20091211110738-16gir4rbmwb1kl6z) (pib:16)
[6 Mar 2010 10:59] Bugs System
Pushed into 5.5.3-m3 (revid:alik@sun.com-20100306103849-hha31z2enhh7jwt3) (version source revid:vvaintroub@mysql.com-20100216221947-luyhph0txl2c5tc8) (merge vers: 5.5.99-m3) (pib:16)
[8 Mar 2010 9:20] MC Brown
A note has been added to the 5.5.3 changelog.