This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new c141094b4ca Add SQL parser test cases for MySQL (#37834)
c141094b4ca is described below
commit c141094b4ca888e51d74981b5a04c15d15429f38
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jan 25 14:39:56 2026 +0800
Add SQL parser test cases for MySQL (#37834)
---
test/it/parser/src/main/resources/case/ddl/alter-instance.xml | 1 +
test/it/parser/src/main/resources/case/ddl/alter-table.xml | 11 ++++++++++-
.../src/main/resources/sql/supported/ddl/alter-instance.xml | 1 +
.../src/main/resources/sql/supported/ddl/alter-table.xml | 1 +
4 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/test/it/parser/src/main/resources/case/ddl/alter-instance.xml
b/test/it/parser/src/main/resources/case/ddl/alter-instance.xml
index b42691f9eb3..05d06de3894 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-instance.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-instance.xml
@@ -18,4 +18,5 @@
<sql-parser-test-cases>
<common sql-case-id="alter_instance_doris_rotate_innodb_master_key" />
+ <common sql-case-id="alter_instance_mysql_rotate_innodb_master_key" />
</sql-parser-test-cases>
diff --git a/test/it/parser/src/main/resources/case/ddl/alter-table.xml
b/test/it/parser/src/main/resources/case/ddl/alter-table.xml
index 48e364dd440..ba6a9279eb5 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-table.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-table.xml
@@ -2596,7 +2596,7 @@
</column-position>
</add-column>
</alter-table>
-
+
<alter-table sql-case-id="alter_table_with_algorithm_lock_doris">
<table name="t_order" start-index="12" stop-index="18" />
<add-column>
@@ -2605,6 +2605,15 @@
</column-definition>
</add-column>
</alter-table>
+
+ <alter-table sql-case-id="alter_table_with_algorithm_lock_mysql">
+ <table name="t_order" start-index="12" stop-index="18" />
+ <add-column>
+ <column-definition type="INT" start-index="31" stop-index="41">
+ <column name="col_alg" start-index="31" stop-index="37" />
+ </column-definition>
+ </add-column>
+ </alter-table>
<alter-table sql-case-id="alter_table_add_check_constraint_doris">
<table name="t_order" start-index="12" stop-index="18" />
diff --git
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-instance.xml
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-instance.xml
index f127e8645de..f5f5bc299e6 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-instance.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-instance.xml
@@ -18,4 +18,5 @@
<sql-cases>
<sql-case id="alter_instance_doris_rotate_innodb_master_key" value="ALTER
INSTANCE ROTATE INNODB MASTER KEY" db-types="Doris" />
+ <sql-case id="alter_instance_mysql_rotate_innodb_master_key" value="ALTER
INSTANCE ROTATE INNODB MASTER KEY" db-types="MySQL" />
</sql-cases>
diff --git
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
index 2800a1a2d05..b3b9020af7c 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-table.xml
@@ -379,6 +379,7 @@
<sql-case id="alter_table_rename_rollup" value="ALTER TABLE example_table
RENAME ROLLUP rollup1 rollup2" db-types="Doris" />
<sql-case id="alter_table_rename_partition" value="ALTER TABLE
example_table RENAME PARTITION partition1 partition2" db-types="Doris" />
<sql-case id="alter_table_with_algorithm_lock_doris" value="ALTER TABLE
t_order ADD COLUMN col_alg INT, ALGORITHM=INSTANT, LOCK=NONE" db-types="Doris"
/>
+ <sql-case id="alter_table_with_algorithm_lock_mysql" value="ALTER TABLE
t_order ADD COLUMN col_alg INT, ALGORITHM=INPLACE, LOCK=EXCLUSIVE"
db-types="MySQL" />
<sql-case id="alter_table_drop_column_doris" value="ALTER TABLE t_order
DROP COLUMN old_col" db-types="Doris" />
<sql-case id="alter_table_drop_index_doris" value="ALTER TABLE t_order
DROP INDEX idx_old" db-types="Doris" />
<sql-case id="alter_table_convert_charset_collate_doris" value="ALTER
TABLE t_order CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin"
db-types="Doris" />