Missing execution of delete, insert statements with PS 5.6 and Toku

Bug #1441392 reported by Peiran Song
8
This bug affects 1 person
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 ProductDimInsert.java java code.
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://dev.flexion.se/janr/db_export_delete_insert_bug/

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: i51014
tags: added: i51014
Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the report.

I cannot repeat error with version 5.6.24. Please send us configuration file you use.

Changed in percona-server:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Percona Server because there has been no activity for 60 days.]

Changed in percona-server:
status: Incomplete → Expired
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3278

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.