Bug #39009 System hangs if "concurrent_insert=1" and a hole in the data.
Submitted: 25 Aug 2008 13:57 Modified: 25 Aug 2008 16:46
Reporter: Horst Hunger Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.28-debug OS:Linux (2.6.22.18-0.2-default #1 SMP)
Assigned to: CPU Architecture:Any

[25 Aug 2008 13:57] Horst Hunger
Description:
Setting "concurrent_insert=1" and having a hole in the date let the system hang. See following sequence of statements:
CREATE TABLE t1
(
name VARCHAR(30)
);
SET @start_value= @@global.concurrent_insert;

SET @@global.concurrent_insert = 1;
INSERT INTO t1(name) VALUES('Record_1');
INSERT INTO t1(name) VALUES('Record_2');
INSERT INTO t1(name) VALUES('Record_3');
DELETE FROM t1 WHERE name ='Record_2';
# lock table and connect with connection1
LOCK TABLE t1 READ LOCAL;
connect (test_con1,localhost,root,,);
INSERT INTO t1(name) VALUES('Record_7');
SELECT * FROM t1;
connection default;
UNLOCK TABLES;
SELECT * FROM t1;
INSERT INTO t1(name) VALUES('Record_6');
--echo ## Dropping table ##
DROP TABLE t1;
disconnect test_con1;
SET @@global.concurrent_insert= @start_value;

See also bug#37282.

How to repeat:
execute the attached test program or the sequence of statements above.

Suggested fix:
no idea.
[25 Aug 2008 15:40] MySQL Verification Team
Thank you for the bug report.
[25 Aug 2008 16:46] Sveta Smirnova
Thank you for the report.

Your test case contains:

--echo ## locking table ##
LOCK TABLE t1 READ LOCAL;

--echo ## Creating new connection to insert some rows in table ##
connect (test_con1,localhost,root,,);
connection test_con1;

--echo ## New records should come at the end of all rows ##
INSERT INTO t1(name) VALUES('Record_4');
SELECT * FROM t1;

So INSERT locks and this is correct behavior. When I tried to change test to --send INSERT INTO t1(name) VALUES('Record_4'); or use command line client no hang occurred. So I close the report as "Can't repeat"