Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support rename table without keyword TABLE
- Loading branch information
Showing
3 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
tests/queries/0_stateless/02891_rename_table_without_keyword.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
r1 | ||
r2 | ||
r3 |
14 changes: 14 additions & 0 deletions
14
tests/queries/0_stateless/02891_rename_table_without_keyword.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
DROP DATABASE IF EXISTS rename_db; | ||
CREATE DATABASE rename_db; | ||
|
||
CREATE TABLE rename_db.r1 (name String) Engine=Memory(); | ||
SHOW TABLES FROM rename_db; | ||
|
||
RENAME TABLE rename_db.r1 TO rename_db.r2; | ||
SHOW TABLES FROM rename_db; | ||
|
||
RENAME rename_db.r2 TO rename_db.r3; | ||
SHOW TABLES FROM rename_db; | ||
|
||
DROP DATABASE rename_db; | ||
|