-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replicators: Implement MySQL JSON print
MySQL has its own implementation for printing JSON, which is implicitly called when executing a SELECT on a table that has a JSON column. This implementation adds spaces after the colon and comma in each key-value pair. During snapshot we retrieve the data via SELECT * FROM table, which returns the JSON data in the MySQL own format. When MySQL sends data via binlog, it sends the json without the extra spaces. Our current implementation to lookup a row, requires a full match of the row values, which fails when the JSON data is not in the MySQL format. This commit adds a new function to the MySQL connector to print the JSON data using MySQL format. This function is used in the replicator to transform the JSON data before converting it to DfValue. Fixes: REA-4724 Fixes: #1361 Release-Note-Core: Fixes an issue where the MySQL replicator fails to match rows when the table has JSON fields, causing the record to become stalled. Change-Id: I62e1885b2ee08f498e621e52ac4044bcc1664019 Reviewed-on: https://gerrit.readyset.name/c/readyset/+/7896 Tested-by: Buildkite CI Reviewed-by: Johnathan Davis <jcd@readyset.io>
- Loading branch information
1 parent
7c63128
commit 7094779
Showing
3 changed files
with
135 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters