Bug #41026 maria: Duplicate entry '...' for key 'PRIMARY' in sysbench OLTP_RW test
Submitted: 25 Nov 2008 19:08 Modified: 4 Dec 2008 13:55
Reporter: Alexey Stroganov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:6.0.8-release OS:Any
Assigned to: CPU Architecture:Any

[25 Nov 2008 19:08] Alexey Stroganov
Description:
Duplicate entry '...' for key 'PRIMARY' error happens in sysbench OLTP_RW test for Maria. Issue observed when number of threads are higher than 64.

Example of sysbench output:
...
Doing OLTP test.
Running mixed OLTP test
Using Uniform distribution
Using "BEGIN" for starting transactions
Using auto_inc on the id column
Threads started!
ALERT: failed to execute mysql_stmt_execute(): Err1062 Duplicate entry '408025' for key 'PRIMARY'
FATAL: database error, exiting...
Done.

How to repeat:
There is no repeatable test case. One need to run series of sysbench OLT_RW tests against Maria server. Instructions will be added later.
[28 Nov 2008 9:39] Guilhem Bichot
Hi Ranger. For me it's a bug only if the primary key is auto_increment and one is always inserting NULL into it (i.e. values autogenerated by the server, not specified by the client); is this the case in the test?
[28 Nov 2008 14:59] Alexey Stroganov
Today on Windows 2008 I've observed this issue for other engines (MyISAM/InnoDB) as well. I don't know what is special to Maria that on Linux I saw such issue for this engine only and why other engines are not affected. I will try to isolate this issue and will update bug report with my findings.
[4 Dec 2008 13:55] Alexey Stroganov
It turned out that this issue was caused by bug in sysbench that didn't properly perform lock/unlock.