MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mysqlbinlog_start_stop_2.inc
1 # ==== Purpose ====
2 #
3 # Auxiliary file used by include/mysqlbinlog_start_stop_1.inc
4 #
5 # This prints a header, then runs mysqlbinlog once with given parameters.
6 #
7 # ==== Usage ====
8 #
9 # --let $extra_options= X
10 # --let $options= Y
11 # --source include/mysqlbinlog-start-stop-2.inc
12 #
13 # Parameters:
14 #
15 # $extra_options
16 # Options that will be passed to mysqlbinlog but not printed to the test log
17 #
18 # $options
19 # Options that will be printed as a header in the test log.
20 
21 
22 # Pretty-print $option_text
23 --let $option_text= `SELECT SUBSTR(REPLACE('$option', '"', ''), 3)`
24 while (`SELECT LOCATE('=', '$option_text')`)
25 {
26  --let $dash_pos= `SELECT LOCATE('--', '$option_text')`
27  --let $option_text= `SELECT CONCAT(SUBSTR('$option_text', 1, LOCATE('=', '$option_text') - 1), IF($dash_pos, CONCAT(' ', SUBSTR('$option_text', $dash_pos + 2)), ''))`
28 }
29 --echo
30 --echo ---- $option_text ----
31 
32 # Print output
33 --replace_regex /SET @@SESSION.GTID_NEXT= '.*'/SET @@SESSION.GTID_NEXT= 'GTID'/ /([0-9A-Fa-f\-]{36})\:[0-9]+\-[0-9]+/UUID:#-#/
34 --exec $MYSQL_BINLOG --short-form $option $extra_options