forked from pingcap/tiflash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support ddl job type of
ActionRenameTables
in TiFlash (pingcap#4234)
close pingcap#4215
- Loading branch information
1 parent
c0d45dc
commit 1d7010b
Showing
10 changed files
with
153 additions
and
7 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
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
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
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
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
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
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
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
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,31 @@ | ||
# Preparation. | ||
=> DBGInvoke __enable_schema_sync_service('false') | ||
|
||
=> DBGInvoke __drop_tidb_table(default, t1) | ||
=> DBGInvoke __drop_tidb_table(default, t2) | ||
=> drop table if exists default.t1 | ||
=> drop table if exists default.t2 | ||
=> DBGInvoke __refresh_schemas() | ||
|
||
=> DBGInvoke __set_flush_threshold(1000000, 1000000) | ||
|
||
|
||
=> DBGInvoke __create_tidb_tables(default, t1, t2) | ||
# rename table | ||
=> DBGInvoke __rename_tidb_tables(default, t1, r1, default, t2, r2) | ||
=> DBGInvoke __refresh_schemas() | ||
=> select database,name,engine from system.tables where database='default' and name='r1' | ||
┌─database─┬─name─┬─engine─────┐ | ||
│ default │ r1 │ DeltaMerge │ | ||
└──────────┴──────┴────────────┘ | ||
=> select database,name,engine from system.tables where database='default' and name='r2' | ||
┌─database─┬─name─┬─engine─────┐ | ||
│ default │ r2 │ DeltaMerge │ | ||
└──────────┴──────┴────────────┘ | ||
|
||
# clean | ||
=> DBGInvoke __drop_tidb_table(default, r1) | ||
=> DBGInvoke __drop_tidb_table(default, r2) | ||
=> drop table if exists default.r1 | ||
=> drop table if exists default.r2 | ||
=> DBGInvoke __enable_schema_sync_service('true') |
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