| 1 |
# Auxaliary file for printing optional metadata in table_map_log_event |
| 2 |
# Usage : |
| 3 |
# --let $binlog_file= |
| 4 |
# [--let $stop_position] |
| 5 |
# [--let $print_primary_key] |
| 6 |
# --source extra/binlog_tests/print_optional_metadata.inc |
| 7 |
|
| 8 |
--let $output_file= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.output |
| 9 |
|
| 10 |
--let $_stop_position_opt= |
| 11 |
if ($stop_position) |
| 12 |
{ |
| 13 |
--let $_stop_position_opt=--stop-position=$stop_position |
| 14 |
} |
| 15 |
|
| 16 |
--exec $MYSQL_BINLOG -F --print-table-metadata $_stop_position_opt $binlog_file > $output_file |
| 17 |
|
| 18 |
|
| 19 |
--let SEARCH_PATTERN= (?m-s:# (?:Columns\(| {8}).*) |
| 20 |
--let SEARCH_FILE= $output_file |
| 21 |
--let SEARCH_OUTPUT=matches |
| 22 |
--source include/search_pattern_in_file.inc |
| 23 |
|
| 24 |
if ($print_primary_key) |
| 25 |
{ |
| 26 |
--let SEARCH_PATTERN= # Primary Key |
| 27 |
--source include/search_pattern_in_file.inc |
| 28 |
} |
| 29 |
--remove_file $output_file |
| 30 |
--let $stop_position= |
| 31 |
--let $_stop_position_opt= |
| 32 |
|
| 33 |
|