3 # Wait for slave SQL error, skip the erroneous statement and restart
8 # --let $slave_sql_error= NUMBER
9 # [--let $show_sql_error= 1]
10 # [--let $slave_skip_counter= 1]
11 # [--let $not_switch_connection= 1]
12 # [--let $rpl_debug= 1]
13 # [--let $slave_timeout= NUMBER]
14 # --source include/wait_for_slave_sql_error_and_skip.inc
19 # The error number to wait for. This is required. (See
20 # wait_for_slave_sql_error.inc)
23 # If set, will print the error to the query log.
26 # If set, skip this number of events. If not set, skip one event.
28 # $not_switch_connection
29 # By default, this script executes on the connection 'slave'. If
30 # $not_switch_connection is set, this script executes on the current
31 # connection. In any case, the original connection is restored.
34 # See include/wait_for_slave_param.inc
37 # See include/rpl_init.inc
40 --let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno]
41 --source include/begin_include_file.inc
50 if (!$not_switch_connection)
52 --let $rpl_connection_name= slave
53 --source include/rpl_connection.inc
57 source include/wait_for_slave_sql_error.inc;
60 # skip the erroneous statement
61 if ($slave_skip_counter) {
62 eval SET GLOBAL SQL_SLAVE_SKIP_COUNTER= $slave_skip_counter;
64 if (!$slave_skip_counter) {
65 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
67 source include/start_slave.inc;
70 --let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno]
71 --source include/end_include_file.inc