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 bd269f48c29 Add SQL parser test cases for MySQL (#37836)
bd269f48c29 is described below

commit bd269f48c2955276588e10712016bc7e073fe974
Author: Liang Zhang <[email protected]>
AuthorDate: Sun Jan 25 17:35:26 2026 +0800

    Add SQL parser test cases for MySQL (#37836)
---
 test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml      | 5 +++++
 test/it/parser/src/main/resources/case/ddl/drop-tablespace.xml       | 1 +
 .../parser/src/main/resources/sql/supported/ddl/alter-tablespace.xml | 1 +
 .../parser/src/main/resources/sql/supported/ddl/drop-tablespace.xml  | 1 +
 4 files changed, 8 insertions(+)

diff --git a/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml 
b/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml
index e9f6b1181d3..361ccd31411 100644
--- a/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml
+++ b/test/it/parser/src/main/resources/case/ddl/alter-tablespace.xml
@@ -26,6 +26,11 @@
         <tablespace start-index="17" stop-index="22" name="ts_ndb" />
     </alter-tablespace>
     
+    <alter-tablespace sql-case-id="alter_tablespace_ndb_wait_rename_mysql">
+        <tablespace start-index="17" stop-index="22" name="ts_ndb" />
+        <rename start-index="62" stop-index="71" name="ts_ndb_new" />
+    </alter-tablespace>
+    
     <alter-tablespace sql-case-id="alter_tablespace_innodb_add_datafile_doris" 
db-types="Doris">
         <tablespace start-index="17" stop-index="25" name="ts_innodb" />
     </alter-tablespace>
diff --git a/test/it/parser/src/main/resources/case/ddl/drop-tablespace.xml 
b/test/it/parser/src/main/resources/case/ddl/drop-tablespace.xml
index ee51af2dc0c..711833a7ec2 100644
--- a/test/it/parser/src/main/resources/case/ddl/drop-tablespace.xml
+++ b/test/it/parser/src/main/resources/case/ddl/drop-tablespace.xml
@@ -20,4 +20,5 @@
     <drop-tablespace sql-case-id="drop_tablespace_constraints" />
     <drop-tablespace sql-case-id="drop_tablespace_datafiles" />
     <drop-tablespace sql-case-id="drop_tablespace_simple_doris" />
+    <drop-tablespace sql-case-id="drop_tablespace_simple_mysql" />
 </sql-parser-test-cases>
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/alter-tablespace.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/alter-tablespace.xml
index 828595babf8..0218a4f9235 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/alter-tablespace.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/alter-tablespace.xml
@@ -19,6 +19,7 @@
 <sql-cases>
     <sql-case id="alter_tablespace_rename" value="ALTER TABLESPACE ts1 RENAME 
TO ts2" db-types="MySQL,Oracle,Doris" />
     <sql-case id="alter_tablespace_ndb_add_datafile_doris" value="ALTER 
TABLESPACE ts_ndb ADD DATAFILE 'ts1.ibd' INITIAL_SIZE 100M ENGINE ndb" 
db-types="Doris" />
+    <sql-case id="alter_tablespace_ndb_wait_rename_mysql" value="ALTER 
TABLESPACE ts_ndb ADD DATAFILE 'ts2.ibd' WAIT RENAME TO ts_ndb_new ENGINE NDB" 
db-types="MySQL" />
     <sql-case id="alter_tablespace_innodb_add_datafile_doris" value="ALTER 
TABLESPACE ts_innodb ADD DATAFILE 'ts2.ibd' INITIAL_SIZE 50M ENGINE innodb" 
db-types="Doris" />
     <sql-case id="alter_tablespace_innodb_add_datafile_mysql" value="ALTER 
TABLESPACE ts_innodb ADD DATAFILE 'ts2.ibd' INITIAL_SIZE 50M ENGINE=INNODB" 
db-types="MySQL" />
     <sql-case id="alter_tablespace_read_only" value="ALTER TABLESPACE ts1 READ 
ONLY" db-types="Oracle" />
diff --git 
a/test/it/parser/src/main/resources/sql/supported/ddl/drop-tablespace.xml 
b/test/it/parser/src/main/resources/sql/supported/ddl/drop-tablespace.xml
index 3f9f1ad0013..96bbbb4c261 100644
--- a/test/it/parser/src/main/resources/sql/supported/ddl/drop-tablespace.xml
+++ b/test/it/parser/src/main/resources/sql/supported/ddl/drop-tablespace.xml
@@ -20,4 +20,5 @@
     <sql-case id="drop_tablespace_constraints" value="DROP TABLESPACE tabs_02 
INCLUDING CONTENTS CASCADE CONSTRAINTS" db-types="Oracle" />
     <sql-case id="drop_tablespace_datafiles" value="DROP TABLESPACE tabs_01 
INCLUDING CONTENTS AND DATAFILES" db-types="Oracle" />
     <sql-case id="drop_tablespace_simple_doris" value="DROP TABLESPACE ts1" 
db-types="Doris" />
+    <sql-case id="drop_tablespace_simple_mysql" value="DROP TABLESPACE ts1" 
db-types="MySQL" />
 </sql-cases>

Reply via email to