Skip to content

Support ANSI_QUOTES in MySQL/MariaDB DDL#4452

Open
ilidemi wants to merge 6 commits into
mainfrom
mysql/task-821
Open

Support ANSI_QUOTES in MySQL/MariaDB DDL#4452
ilidemi wants to merge 6 commits into
mainfrom
mysql/task-821

Conversation

@ilidemi

@ilidemi ilidemi commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Parse out status vars from query event and pass the flag to the tidb parser. Add an integration test that can work with binlog more freely as we can't really observe query parsing from e2e (besides the 5.7-pos configuration that doesn't have binlog metadata to fall back on, but we need a maria test as well).

As a bonus, the integration test runs in 1.2 seconds.

Closes DBI-821

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Failure

Analysis: Real failure: the PR's own new test Test_MySQL_ANSIQuotes_DDL fails deterministically because the ANSI_QUOTES ADD COLUMN DDL is dropped during MySQL→ClickHouse replication, so destination column 'c' is missing (the exact bug this WIP PR targets).
Confidence: 0.92

⚠️ This appears to be a real bug - manual intervention needed

View workflow run

Comment thread flow/connectors/mysql/cdc.go
Comment thread flow/e2e/clickhouse_mysql_test.go Outdated
@ilidemi ilidemi changed the title [WIP] 821 Q_SQL_MODE_CODE never parsed - ANSI_QUOTES DDL dropped Support ANSI_QUOTES in MySQL/MariaDB DDL Jun 24, 2026
@ilidemi ilidemi marked this pull request as ready for review June 24, 2026 05:21
@ilidemi ilidemi requested a review from a team as a code owner June 24, 2026 05:21
@claude

claude Bot commented Jun 24, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@pfcoperez pfcoperez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with non-blocking comments.


var syncer *replication.BinlogSyncer
var stream *replication.BinlogStreamer
if internal.MySQLTestVersionIsMySQLPos() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rreviewing on the assumption that we are not going to support/validate MariaDBPos, correct?

) ([]byte, string) {
t.Helper()

streamCtx, cancel := context.WithTimeout(ctx, 30*time.Second)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are timeouting in 30', what's the average time it takes for this to complete, 1/2, 1/10, ... of this time?


// testDBName namespaces a database per test with a random suffix, mirroring the
// e2e suite convention, so parallel tests and reruns don't collide.
func testDBName(prefix string) string {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems generic enough to me as to be added to a common test library such as flow/e2eshared/e2eshared.go

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.

2 participants