Retry autoinc insert which failed for duplicate key

Bug #355000 reported by Seppo Jaakola
2
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Fix Released
Medium
Seppo Jaakola

Bug Description

We see occasionally with Drupal benchmark, a duplicate key conflict, where two subsequent inserts result in same value for the auto increment column. This appears as native MySQL issue and is likely not due to wsrep integration patches.

There are Drupal bug report(s) about the situation:
http://drupal.org/node/282555

Reproducing this situation does not happen easily, and we don't have enough visibility to trace the cause for the issue so far. However, it seems quite simple to provide a workaround for the problem, by simply retrying the latter insert.

Condition for retrying is:
* insert fails for duplicate key error
* insert was part of local state autocommit transaction
* insert was for a table having autoincrement column
* there was no value given for the autoincrement column (NULL or 0)

There should also be option variable for enabling/disabling this work around, like: wsrep_drupal_282555

This fix would enable us to complete Drupal benchmarking. Of course, the root cause must be eventually fixed. There will be a separate bug report for that.

Changed in codership-mysql:
assignee: nobody → seppo-jaakola
importance: Undecided → Medium
milestone: none → 0.6
status: New → In Progress
Changed in codership-mysql:
status: In Progress → Fix Committed
Changed in codership-mysql:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.