Skip to content

Commit

Permalink
[MariaDB] Support RENAME TABLE IF EXISTS (#4165)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros authored Jul 17, 2024
1 parent 4a6bb3d commit b2a3535
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/mariadb/MariaDBParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ dropSequence // sequence is MariaDB-specific only
// Other DDL statements

renameTable
: RENAME TABLE renameTableClause (',' renameTableClause)*
: RENAME TABLE ifExists? renameTableClause (',' renameTableClause)*
;

renameTableClause
Expand Down
1 change: 1 addition & 0 deletions sql/mariadb/examples/fast/ddl_create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ RENAME TABLE old_table TO tmp_table, new_table TO old_table, tmp_table TO new_ta
RENAME TABLE table_b TO table_a;
RENAME TABLE current_db.tbl_name TO other_db.tbl_name;
rename table debezium_all_types_old to debezium_all_types, test_json_object_old wait 10 to test_json_object;
RENAME TABLE IF EXISTS EMPLOYEE TO employee;
#end
#begin
-- Truncate table
Expand Down

0 comments on commit b2a3535

Please sign in to comment.