Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
None
Description
The task would enable online operations only using SQL command
We would following workflow
set global replicate-same-server-id=1:
CHANGE MASTER 'online' TO master_host='127.0.0.1, master_user='skysql' , master_password='skyvodka' ;
set global online.replicate_do_table='db1.t';
set global online.rewrite_db='db->db_new';
create or replace database db_new;
create or replace table db_new.t like db_new.t ;
-> online operation to be produce resharding or ddl
alter table db_new.t add column c1 int ;
LOCK TABLE db_new.t
set global online.@@slav_pos = @@current_pos;
CHANGE MASTER 'online' TO master_use_gtid=slave_pos
START SLAVE;
UNLOCK TABLE db_new.t
insert ignore into db_new.t select * from db.t
Wait to catch replication
rename atomic of the 2 tables
reset replication
Attachments
Issue Links
- duplicates
-
MDEV-15530 Variable replicate_rewrite_db cannot be found in "show global variables"
- Closed