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

Add support for MySQL TRUNCATE TABLE #1221

Closed
altmannmarcelo opened this issue Apr 12, 2024 · 0 comments
Closed

Add support for MySQL TRUNCATE TABLE #1221

altmannmarcelo opened this issue Apr 12, 2024 · 0 comments

Comments

@altmannmarcelo
Copy link
Contributor

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

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant