blob: 878773d2b5bd10fb3072d176da0d181eb360318c (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
##############################################################################
# It's an auxiliary file used to show binary log events or relay log events.
# It is only called by show_binlog_events.inc and show_relaylog_events.inc.
##############################################################################
# Do not modify $binlog_start - if we did, it could wrongly persist until a
# later call of show_events.inc.
if ($binlog_start)
{
--let $_binlog_start= $binlog_start
}
if (!$binlog_start)
{
# If $binlog_start is not set, we will set it as the third event's
# position (second in relay log which has not Binlog Checkpoing event).
# The first two events (Description Event and Binlog Checkpoint
# event) are always ignored. For description event's length might be changed
# because of adding new events, 'SHOW BINLOG EVENTS LIMIT 2' is used to get
# the right value.
if ($is_relay_log)
{
--let $_binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 1, End_log_pos, 1)
}
if (!$is_relay_log)
{
--let $_binlog_start= query_get_value(SHOW BINLOG EVENTS LIMIT 2, End_log_pos, 2)
}
}
--let $_statement=show binlog events
if ($is_relay_log)
{
--let $_statement=show relaylog events
}
if ($binlog_file)
{
--let $_statement= $_statement in '$binlog_file'
}
--let $_statement= $_statement from $_binlog_start
# Cannot use if($binlog_limit) since the variable may begin with a 0
if (`SELECT '$binlog_limit' <> ''`)
{
--let $_statement= $_statement limit $binlog_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=#/ /Server ver:.*$/SERVER_VERSION, BINLOG_VERSION/
--eval $_statement
|