Commit cff27c6b authored by Sergey Petrunya's avatar Sergey Petrunya

MWL#36: Add a mysqlbinlog option to change the used database

- Apply Alexander Ivanov's fix to testsuite
parent e1e10417
......@@ -51,9 +51,16 @@ DELETE FROM test3.t3 WHERE a=1;
flush logs;
--echo #
--echo # mysqlbinlog output
--echo # --base64-output = decode-rows
--echo # --rewrite-db = test1->new_test1
--echo # --rewrite-db = test3->new_test3
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v $MYSQLD_DATADIR/master-bin.000001
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v $MYSQLD_DATADIR/master-bin.000001
DROP DATABASE test1;
DROP DATABASE test2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment