summaryrefslogtreecommitdiff
path: root/mysql-test/include/show_relaylog_events.inc
diff options
context:
space:
mode:
authorunknown <Li-Bing.Song@sun.com>2010-05-26 22:34:25 +0800
committerunknown <Li-Bing.Song@sun.com>2010-05-26 22:34:25 +0800
commit71e534542bfb6b2cc40909a8bb975fc7564998d0 (patch)
tree20ebc2f49e17beacbc4a6ebcaa6727f8eb8e765d /mysql-test/include/show_relaylog_events.inc
parent42d91c688c27f9b2496ec6e82535b69ec5d69697 (diff)
parent8f8e1d6fb85d4be1e8e44beb22b26a72f76ac84e (diff)
downloadmariadb-git-71e534542bfb6b2cc40909a8bb975fc7564998d0.tar.gz
Manual merge
Diffstat (limited to 'mysql-test/include/show_relaylog_events.inc')
-rw-r--r--mysql-test/include/show_relaylog_events.inc54
1 files changed, 20 insertions, 34 deletions
diff --git a/mysql-test/include/show_relaylog_events.inc b/mysql-test/include/show_relaylog_events.inc
index 6f63b055d58..d1bd11f1642 100644
--- a/mysql-test/include/show_relaylog_events.inc
+++ b/mysql-test/include/show_relaylog_events.inc
@@ -1,35 +1,21 @@
-# $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
+##############################################################################
+# Show relay log events
+#
+# Useage:
+# let $binlog_file= slave-relay-bin.000002;
+# let $binlog_start= 106;
+# let $binlog_limit= 1, 3;
+# source include/show_relaylog_events.inc;
+#
+# It shows the first relay log file if $binlog_file is not given.
+#
+# It shows events from the end position of the description event if
+# $binlog_start is not given.
+#
+# It shows all of the events if $binlog_limit is not given.
+# $binlog_format has the same semantic with 'LIMIT' option.
+#
+##############################################################################
-let $show_binlog_events= show relaylog events;
-
-if (!$binlog_start)
-{
- # defaults to chop the first event in the binary log
- let $binlog_start=106;
-}
-
-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=#/ /Server ver:.*$/SERVER_VERSION, BINLOG_VERSION/
---eval $show_binlog_events
+--let $is_relay_log= 1
+--source include/show_events.inc