-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add support for MySQL TRUNCATE TABLE #1221
Comments
readysetbot
pushed a commit
that referenced
this issue
May 15, 2024
Since MySQL binlogs `TRUNCATE` as a statement (`QUERY_EVENT`), but it's not DDL and doesn't have a corresponding recipe `Change`, we were just ignoring it. Now the MySQL replicator parses it, emitting the `TableOperation::Truncate` we had already added for Postgres. Fixes: REA-4325 Closes: #1221 Change-Id: Ia40551e40fa70598973587f5b26e8662419e9853
readysetbot
pushed a commit
that referenced
this issue
May 15, 2024
Since MySQL binlogs `TRUNCATE` as a statement (`QUERY_EVENT`), but it's not DDL and doesn't have a corresponding recipe `Change`, we were just ignoring it. Now the MySQL replicator parses it, emitting the `TableOperation::Truncate` we had already added for Postgres. Fixes: REA-4325 Closes: #1221 Release-Note-Core: Replicate `TRUNCATE` statements from MySQL. Change-Id: Ia40551e40fa70598973587f5b26e8662419e9853
readysetbot
pushed a commit
that referenced
this issue
May 15, 2024
Since MySQL binlogs `TRUNCATE` as a statement (`QUERY_EVENT`), but it's not DDL and doesn't have a corresponding recipe `Change`, we were just ignoring it. Now the MySQL replicator parses it, emitting the `TableOperation::Truncate` we had already added for Postgres. Fixes: REA-4325 Closes: #1221 Release-Note-Core: Replicate `TRUNCATE` statements from MySQL. Change-Id: Ia40551e40fa70598973587f5b26e8662419e9853
readysetbot
pushed a commit
that referenced
this issue
May 16, 2024
Since MySQL binlogs `TRUNCATE` as a statement (`QUERY_EVENT`), but it's not DDL and doesn't have a corresponding recipe `Change`, we were just ignoring it. Now the MySQL replicator parses it, emitting the `TableOperation::Truncate` we had already added for Postgres. Fixes: REA-4325 Closes: #1221 Release-Note-Core: Added support for `TRUNCATE TABLE` statements for MySQL. Change-Id: Ia40551e40fa70598973587f5b26e8662419e9853
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Truncate table is logged as a STATEMENT (EventType::QUERY_EVENT) .
This is meant to remove all the rows in the table.
Currently we skip this event leaving Readyset and MySQL in different states.
Change in user-visible behavior
Requires documentation change
The text was updated successfully, but these errors were encountered: