forked from pingcap/dm
-
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.
ha: refactor online DDL (pingcap#494)
- Loading branch information
1 parent
31bc6d0
commit f4c1a44
Showing
8 changed files
with
53 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
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,2 @@ | ||
name = "worker3" | ||
join = "127.0.0.1:8261" |
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,11 @@ | ||
use online_ddl; | ||
insert into t1 (uid, name, info) values (10006, 'name of 10006', '{"age": 10006}'); | ||
insert into t2 (uid, name, info) values (20008, 'name of 20008', '{"age": 20008}'); | ||
alter table t1 add column address varchar(255); | ||
alter table t2 add column address varchar(255); | ||
insert into t2 (uid, name, info, address) values (20009, 'name of 20009', '{"age": 20009}', 'address of 20009'); | ||
insert into t1 (uid, name, info, address) values (10007, 'name of 10007', '{"age": 10007}', 'address of 10007'); | ||
alter table t2 drop column age; | ||
alter table t1 drop column age; | ||
insert into t1 (uid, name, info, address) values (10008, 'name of 10008', '{"age": 10008}', 'address of 10008'); | ||
insert into t2 (uid, name, info, address) values (20010, 'name of 20010', '{"age": 20010}', 'address of 20010'); |
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,11 @@ | ||
use online_ddl; | ||
insert into t3 (uid, name, info) values (30004, 'name of 30004', '{"age": 30004}'); | ||
insert into t2 (uid, name, info) values (50002, 'name of 50002', '{"age": 50002}'); | ||
alter table t3 add column address varchar(255); | ||
alter table t2 add column address varchar(255); | ||
insert into t2 (uid, name, info, address) values (50003, 'name of 50003', '{"age": 50003}', 'address of 50003'); | ||
insert into t3 (uid, name, info, address) values (30005, 'name of 30005', '{"age": 30005}', 'address of 30005'); | ||
alter table t2 drop column age; | ||
alter table t3 drop column age; | ||
insert into t3 (uid, name, info, address) values (30006, 'name of 30006', '{"age": 30006}', 'address of 30006'); | ||
insert into t2 (uid, name, info, address) values (50004, 'name of 50004', '{"age": 50004}', 'address of 50004'); |
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