mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -490,7 +490,7 @@ start_slave()
|
||||
--core \
|
||||
--tmpdir=$MYSQL_TMP_DIR \
|
||||
--language=english \
|
||||
--skip-innodb \
|
||||
--skip-innodb --skip-slave-start \
|
||||
$SMALL_SERVER \
|
||||
$EXTRA_SLAVE_OPT $EXTRA_SLAVE_MYSQLD_OPT"
|
||||
if [ x$DO_DDD = x1 ]
|
||||
|
5
mysql-test/r/binlog-backup-restore.result
Normal file
5
mysql-test/r/binlog-backup-restore.result
Normal file
@ -0,0 +1,5 @@
|
||||
n
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
18
mysql-test/t/binlog-backup-restore.test
Normal file
18
mysql-test/t/binlog-backup-restore.test
Normal file
@ -0,0 +1,18 @@
|
||||
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;
|
||||
|
Reference in New Issue
Block a user