Missing execution of delete, insert statements with PS 5.6 and Toku
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Expired
|
Undecided
|
Unassigned |
Bug Description
The bug is filed per customer request.
Description
-------
Basically we have a couple of jobs that use prepared statements to execute
deletes followed by inserts and it seems that sometimes the delete doesn't
complete and the insert is attempted, resulting in dupkey errors, and other
times, the delete happens but not the insert.
I have enabled the general log and seen that mysql thinks it is executing
the delete first and then the insert even for the records where this hasn't
happened.
I don't know if this is a PS 5.6 or Toku or Toku plus PS issue.
All I know is that it doesn't happen with PS5.5 and innodb.
Test case
-------
We have a sample data and java code you can use to easily reproduce the
issue.
Simply run a 5.6.21 PS server with Toku, create the db using the init.sql
script we have and run the ProductDimInser
We have also included a tar file of the java code in case you are
interested in seeing what the code is doing, but the issue is on the sql
side so how we talk to the mysql server shouldnt matter.
You can grab the code to reproduce the issue from:
http://
The outcome of repeatedly running the java app is that you get dupkey
errors.
The code is simply trying to delete each row and insert it again.
Sometimes this delete doesnt seem to execute and so the insert fails
complaining of a duplicate key as the original entry already exists.
The surprising thing was that with the general query log enabled, I could
see the sql for the delete then the insert for the rows that failed, so
dont understand what could be wrong.
tags: | added: i51014 |
Thank you for the report.
I cannot repeat error with version 5.6.24. Please send us configuration file you use.