Bug #10224 ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Submitted: 27 Apr 2005 23:55 Modified: 3 Jun 2005 23:34
Reporter: Dean Ellis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S1 (Critical)
Version:4.0.25 forward OS:
Assigned to: Ingo Strüwing CPU Architecture:Any

[27 Apr 2005 23:55] Dean Ellis
Description:
ANALYZE TABLE and at least CREATE TABLE ... SELECT (from the same table) seem to have some mutex synchronization issue; server eventually crashes.

How to repeat:
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 ( a int );
INSERT INTO t1 VALUES ( 1 );

shell 1:

while ((1)); do mysql test -e"ANALYZE TABLE t1;"; done;

shell 2:

while ((1)); do mysql test -e"CREATE TEMPORARY TABLE t2 SELECT a FROM t1"; done;

Suggested fix:
n/a
[28 Apr 2005 0:30] Dean Ellis
Noting that the crash occurs more quickly if you run multiple instances of the second statement (CREATE TABLE ... SELECT).
[20 May 2005 20:28] Ingo Strüwing
My test script

Attachment: bug10224-1.sh (application/x-sh, text), 4.44 KiB.

[20 May 2005 20:28] Ingo Strüwing
The test script for the global read lock

Attachment: bug10224-2.sh (application/x-sh, text), 5.33 KiB.

[20 May 2005 20:30] Ingo Strüwing
My test scripts are added to the bug report.
[20 May 2005 20:32] Ingo Strüwing
The patch is in "bk commit - 4.0 tree (ingo:1.2096) BUG#10224 Date: Fri, 20 May 2005 22:23:04 +0200" (The Bug Databases automatic reference seems to be broken again)
[25 May 2005 8:24] 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/internals/25250
[31 May 2005 20:07] 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/internals/25421
[31 May 2005 20:07] 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/internals/25422
[31 May 2005 20:16] 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/internals/25423
[1 Jun 2005 11: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/internals/25443
[1 Jun 2005 12:10] Ingo Strüwing
Pushed to 4.0.25, 4.1.13, and 5.0.7.
[3 Jun 2005 23:34] Paul Dubois
Noted in 4.0.25, 4.1.13, 5.0.7 changelogs.