2 # This is an auxiliar script that sets the binlog-row-image
3 # on a set of connections. These connections are passed as
4 # a parameter to this script. Its format is the following:
6 # <conid,value,Y_or_N>:[<conid,value,Y_or_N>:...]
10 # conid -- connection id (eg, master)
11 # value -- binlog_row_image value to set (eg, FULL)
12 # Y_or_N -- Issue stop and start slave (eg, Y)
16 # -- let $row_img_set=master:FULL:N,slave:MINIMAL:Y
17 # -- source include/rpl_row_img_set.inc
21 # 1. This script saves and restores the original connection that was
22 # in use at the time it was included.
24 -- let $old_conn= $CURRENT_CONNECTION
26 while (`SELECT HEX(
'$row_img_set') != HEX(
'')`)
29 -- let $tuple= `SELECT SUBSTRING_INDEX(
'$row_img_set',
',', 1)`
31 -- let $conn= `SELECT SUBSTRING_INDEX(
'$tuple',
':', 1)`
32 -- let $rimg= `SELECT SUBSTRING_INDEX(LTRIM(SUBSTRING(
'$tuple', LENGTH(
'$conn') + 2)),
':', 1)`
34 -- let $is_slave_restart= `SELECT LTRIM(SUBSTRING(
'$tuple', LENGTH(
'$conn') + LENGTH(
'$rimg')+ 3))`
36 -- echo CON:
'$conn', IMG:
'$rimg', RESTART SLAVE:
'$is_slave_restart'
39 -- eval SET SESSION binlog_row_image=
'$rimg'
40 -- eval SET GLOBAL binlog_row_image=
'$rimg'
42 if ($is_slave_restart == Y)
44 -- source include/stop_slave.inc
45 -- source include/start_slave.inc
49 SHOW VARIABLES LIKE
'binlog_row_image';
51 -- let $row_img_set= `SELECT LTRIM(SUBSTRING(
'$row_img_set', LENGTH(
'$tuple') + 2 ))`
55 -- connection $old_conn