mariadb/mysql-test/t/binlog-backup-restore.test
sasha@mysql.sashanet.com be8f18e020 fixed redundant repetition of use db in mysqlbinlog
added support for virtual master ( replicating from a directory with binlogs)
test case for backup/restore with virtual master
2001-04-24 17:39:26 -06:00

18 lines
462 B
Text

reset master;
drop table if exists t1;
create table t1(n int);
insert into t1 values (1),(2),(3),(4);
flush logs;
update t1 set n = n + 10;
save_master_pos;
flush tables with read lock;
system rm -rf var/tmp/backup;
system mkdir -p var/tmp/backup;
system cp var/master-data/master-bin.* var/tmp/backup;
unlock tables;
drop table t1;
eval change master to master_host='$MYSQL_TEST_DIR/var/tmp/backup/master-bin';
slave start;
sync_with_master;
select * from t1;