3 # Waits until the slave SQL thread has been synced, i.e., all events
4 # have been copied over to slave. This is like mtr's built-in command
5 # sync_slave_with_master, but more flexible (e.g., you can set a
6 # custom timeout and you can force it to use GTIDs instead of filename
12 # [--let $sync_slave_connection= <connection_name>]
13 # [--let $use_gtids= 1]
14 # [--let $slave_timeout= NUMBER]
15 # [--let $rpl_debug= 1]
16 # --source include/sync_slave_io_with_master.inc
18 # Must be called on the master. Will change connection to the slave.
23 # If set, uses GTIDs instead of filename and offset for positions.
25 # $sync_slave_connection
26 # By default, this script switches connection to 'slave'. If
27 # $sync_slave_connection is set, then '$sync_slave_connection' is
28 # used instead of 'slave'.
31 # See include/wait_for_slave_param.inc.
34 # See include/rpl_init.inc
37 --let $include_filename= sync_slave_sql_with_master.inc
38 --source include/begin_include_file.inc
40 --source include/save_master_pos.inc
42 --let $rpl_connection_name= slave
43 if ($sync_slave_connection)
45 --let $rpl_connection_name= $sync_slave_connection
47 --source include/rpl_connection.inc
49 --source include/sync_slave_sql.inc
51 --let $include_filename= sync_slave_sql_with_master.inc
52 --let $skip_restore_connection= 1
53 --source include/end_include_file.inc