summaryrefslogtreecommitdiff
path: root/mysql-test/include/show_binlog_events.inc
blob: fcdc52eaf14a256ac5426633655820ea1739f458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# $binlog_start can be set by caller or take a default value
# $binary_log_file the name of the log file show
# $binary_log_limit_row - sets the number of binlog rows to be returned
# $binary_log_limit_offset - sets the offset where to start returning events

let $show_binlog_events= show binlog events;

if (!$binlog_start)
{
  # defaults to chop the first event in the binary log
  let $binlog_start=107;
}

if (!`SELECT '$binary_log_file' = ''`)
{
    let $show_binlog_events= $show_binlog_events in '$binary_log_file';
}
let $show_binlog_events= $show_binlog_events from $binlog_start;

if ($binary_log_limit_row)
{
  let $limit= limit;
  if ($binary_log_limit_offset)
  {
    let $limit= $limit $binary_log_limit_offset, ;
  }

  let $limit= $limit $binary_log_limit_row;
  let $show_binlog_events= $show_binlog_events $limit;
}

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start>
--replace_column 2 # 4 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /block_len=[0-9]+/block_len=#/
--eval $show_binlog_events