Details
Assignee
UnassignedUnassignedReporter
Dossy Shiobara @ PanopticDossy Shiobara @ PanopticPriority
MediumComponents
Affects versions
Fix versions
Labels
Needs QA
Yes
Details
Details
Assignee
Unassigned
UnassignedReporter
Dossy Shiobara @ Panoptic
Dossy Shiobara @ PanopticPriority
Components
Affects versions
Fix versions
Labels
Needs QA
Yes
Smart Checklist
Smart Checklist
Smart Checklist
Created April 6, 2024 at 1:00 AM
Updated December 30, 2024 at 9:34 AM
pt-table-sync
v3.5.7 does not produce the correct SQL statements to properly sync tables containingJSON
columns, at least testing against MySQL 5.7.12.Steps to Reproduce
Pre-test Setup:
Test:
What’s going on:
pt-table-sync
emits the following SQL:The
INSERT
statement works fine, but theDELETE
fails to delete the row with`id`='2'
, because theAND `data`='{"baz": "quux"}'
portion of theWHERE
clause will result in the query matching zero rows.Verify the incorrect contents of the
test_to
table with the following:That should return the following output:
Witness the row with
id=2
still exists in the table, and was not deleted as it should have been.With
JSON
columns, theDELETE
statement would need to look like this:You can non-destructively confirm this using this command:
That should return the following output:
Post-test Cleanup: