Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding implicit string concatenation for a variable assignment needed for binlog replication #217

Merged
merged 2 commits into from
Feb 1, 2023

Conversation

fulghum
Copy link

@fulghum fulghum commented Jan 31, 2023

When a mysqldump is taken for a database tracking GTIDs, it outputs GTID tracking information via a line like:

SET @@GLOBAL.GTID_PURGED= /*!80000 '+'*/ 'beabe64c-9dc6-11ed-8021-a0f9021e8e70:1-126';

In MySQL 8.0+, the MySQL comment inserts a '+' between the = and the assignment value, which gets implicitly concatenated with the adjacent quoted string in MySQL.

GMS/Dolt doesn't support this implicit string concatenation, but I wanted to get this query to work – otherwise customers will have to manually edit their mysql dump files to remove this syntax before it can be imported into Dolt. I didn't think it was worth taking on the larger change right now to support implicit quoted string concatenation everywhere (dolthub/dolt#5232), so instead, I added special handling for this case since it's important for the binlog setup experience.

…nt needed for binlog replication when applying a mysql dump file with GTID information.
@fulghum fulghum marked this pull request as ready for review January 31, 2023 01:23
@fulghum fulghum requested a review from zachmu as a code owner January 31, 2023 01:23
go/vt/sqlparser/sql.y Show resolved Hide resolved
@fulghum fulghum merged commit 864c7d1 into main Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants