Bug #39392 Maria: if INSERT in UNIQUE finds uncommitted same key, error instead of wait
Submitted: 11 Sep 2008 12:58 Modified: 13 Oct 2008 19:59
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S3 (Non-critical)
Version:5.1-maria OS:Linux
Assigned to: Sergei Golubchik CPU Architecture:Any

[11 Sep 2008 12:58] Guilhem Bichot
Description:
mysql> create table t(a int, unique(a)) engine=maria;
Query OK, 0 rows affected (1.27 sec)

# I do a first insert before testing, because when the table is empty we
# take a non-concurrent lock which I don't want in my test
mysql> insert into t values(1);
Query OK, 1 row affected (0.01 sec)

mysql> lock tables t write concurrent;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into t values(2);
Query OK, 1 row affected (0.01 sec)

Then I open another connection and:
mysql> insert into t values(2);
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
the error happens immediately. While, if I remember correctly, the plan was that the second connection would block until commit of the first one.

How to repeat:
see description
[11 Sep 2008 13:01] Guilhem Bichot
Sergei will know if I'm misinterpreting something.
Bug not yet in 6.0 or 6.0-maria due to merge from mysql-maria not yet done.
[11 Sep 2008 13:15] Sergei Golubchik
Default deadlock timeouts were set too low.
New timeout is 50 secs.
[13 Oct 2008 19:59] Guilhem Bichot
fix is in 5.1-maria, not yet in 6.0-maria (which does not have this bug either, so nothing to document). So this can be closed.
[26 Oct 2008 22:20] Bugs System
Pushed into 6.0.8-alpha  (revid:serg@mysql.com-20080911131644-i1ly0emy9va5hant) (version source revid:guilhem@mysql.com-20081020191322-i0e65e3k8044kkce) (pib:5)