Skip to content

Fix unsupported MySQL temporary table DDL before backend execution#38829

Open
Zhengcy05 wants to merge 1 commit into
apache:masterfrom
Zhengcy05:fix/mysql-temporary-table-ddl-intercept
Open

Fix unsupported MySQL temporary table DDL before backend execution#38829
Zhengcy05 wants to merge 1 commit into
apache:masterfrom
Zhengcy05:fix/mysql-temporary-table-ddl-intercept

Conversation

@Zhengcy05

Copy link
Copy Markdown

Fixes #38709.

Changes

Changes proposed in this pull request:

  • Preserve MySQL TEMPORARY semantics in CreateTableStatement and DropTableStatement
  • Populate the temporary-table flag in MySQLDDLStatementVisitor
  • Preserve the temporary flag during statement binding
  • Add a pre-execution guard in KernelProcessor to reject CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE
  • Throw UnsupportedSQLOperationException before SQL is sent to backend
  • Add regression tests for parser semantics, kernel guard behavior, and proxy execution flow

Tests

Added regression coverage for:

  • MySQL parser / visitor temporary semantics
  • kernel-level pre-execution rejection
  • proxy execution flow to verify temporary table DDL does not enter metadata refresh

Executed tests:

mvn -pl parser/sql/engine/dialect/mysql -am -Dtest=MySQLStatementVisitorTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test
mvn -pl infra/context -am -Dtest=KernelProcessorTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test
mvn -pl proxy/backend/core -am -Dtest=StandardDatabaseProxyConnectorTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@Zhengcy05 Zhengcy05 force-pushed the fix/mysql-temporary-table-ddl-intercept branch from 565c817 to 2bbb1aa Compare June 11, 2026 07:22
@Zhengcy05 Zhengcy05 force-pushed the fix/mysql-temporary-table-ddl-intercept branch from 2bbb1aa to c803e13 Compare June 11, 2026 07:27
@Zhengcy05

Copy link
Copy Markdown
Author

@linghengqian Sorry to bother you, the E2E test failed due to Maven download network issue, could you please help re-run the failed job?

@linghengqian linghengqian 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.

Sorry to bother you, the E2E test failed due to Maven download network issue, could you please help re-run the failed job?

I have restarted CI.

I'm not entirely sure about the background of the original issue, and I personally think the current PR needs other committers to help review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants