1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
--source include/have_tokudb_backup.inc
--source include/not_gtid_enabled.inc
--let $SLAVE_INFO_FILE=tokubackup_slave_info
--let $BACKUP_DIR_SLAVE=$MYSQL_TMP_DIR/tokudb_backup_slave
--let $SLAVE_INFO_FILE_PATH=$BACKUP_DIR_SLAVE/$SLAVE_INFO_FILE
--let DDIR=$BACKUP_DIR_SLAVE
# Settings for include/filter_file.inc
--delimiter |
let $script=
s{host: [^,]+,}{host: #.#.#.#,};
s{user: [^,]+,}{user: ####,};
s{port: [^,]+,}{port: ####,};
s{master log file: [^,]+,}{master log file: ####,};
s{relay log file: [^,]+,}{relay log file: ####,};
s{exec master log pos: [^,]+,}{exec master log pos: ####,};
s{executed gtid set: [^,]+, }{executed gtid set: ####, };
s{executed gtid set: [^,]+,[^,]+, }{executed gtid set: ####,####, };
|
--delimiter ;
--let $input_file = $SLAVE_INFO_FILE_PATH
--let $skip_column_names= 1
--echo ###
--echo # Test for binlog position
--echo #####
--mkdir $BACKUP_DIR_SLAVE
--source include/master-slave.inc
--connection master
CREATE TABLE t1(a INT) ENGINE=TokuDB;
DROP TABLE t1;
--sync_slave_with_master
--connection slave
--echo Backup
--disable_query_log
--eval SET SESSION tokudb_backup_dir='$BACKUP_DIR_SLAVE'
--enable_query_log
--source include/filter_file.inc
--echo ### $SLAVE_INFO_FILE content:
--cat_file $SLAVE_INFO_FILE_PATH
--perl
use File::Path 'rmtree';
$DDIR=$ENV{"DDIR"};
rmtree([ "$DDIR" ]);
EOF
--echo ###
--echo # Test for gtid set
--echo #####
--mkdir $BACKUP_DIR_SLAVE
--let $rpl_server_numbers= 1,2
--let $rpl_set_enforce_gtid_consistency= 1
--source include/rpl_set_gtid_mode.inc
--connection master
CREATE TABLE t1(a INT) ENGINE=TokuDB;
DROP TABLE t1;
--sync_slave_with_master
--connection slave
--echo Backup
--disable_query_log
--eval SET SESSION tokudb_backup_dir='$BACKUP_DIR_SLAVE'
--enable_query_log
--source include/filter_file.inc
--echo ### $SLAVE_INFO_FILE content:
--cat_file $SLAVE_INFO_FILE_PATH
--perl
use File::Path 'rmtree';
$DDIR=$ENV{"DDIR"};
rmtree([ "$DDIR" ]);
EOF
--let $rpl_gtid_mode= OFF
--let $rpl_set_enforce_gtid_consistency= 0
--let $rpl_server_numbers= 1,2
--let $rpl_skip_sync= 1
--source include/rpl_set_gtid_mode.inc
--source include/rpl_end.inc
|