summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2011-01-10 14:53:09 +0100
committerunknown <knielsen@knielsen-hq.org>2011-01-10 14:53:09 +0100
commit32379aeba9222d255f151bdea4954932fe784021 (patch)
tree0cd3e1bcd46f1bfcfd44198f3cb01c4d631dc5da /mysql-test/include
parentd653a80d2a62669243477b82757068a1b7874dbb (diff)
downloadmariadb-git-32379aeba9222d255f151bdea4954932fe784021.tar.gz
Merge Percona patch MWL#47 into mariadb 5.2-percona.
This patch adds options to annotate the binlog (and the mysqlbinlog output) with the original SQL query for queries that are logged using row-based replication.
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/binlog_start_pos.inc26
-rw-r--r--mysql-test/include/show_binlog_events.inc2
-rw-r--r--mysql-test/include/show_binlog_events2.inc2
3 files changed, 28 insertions, 2 deletions
diff --git a/mysql-test/include/binlog_start_pos.inc b/mysql-test/include/binlog_start_pos.inc
new file mode 100644
index 00000000000..f6d1c4c68a3
--- /dev/null
+++ b/mysql-test/include/binlog_start_pos.inc
@@ -0,0 +1,26 @@
+##############################################################################
+#
+# binlog_start_pos is the postion of the the first event in the binary log
+# which follows the Format description event. Intended to reduce test suite
+# dependance on the Format description event length changes (e.g. in case
+# of adding new events). Evaluated as:
+#
+# binlog_start_pos = 4 /* binlog header */ +
+# (Format_description_log_event length)
+#
+# Format_description_log_event length =
+# 19 /* event common header */ +
+# 57 /* misc stuff in the Format description header */ +
+# number of events.
+#
+# With current number of events = 160,
+#
+# binlog_start_pos = 4 + 19 + 57 + 160 = 240.
+#
+##############################################################################
+
+let $binlog_start_pos=240;
+--disable_query_log
+SET @binlog_start_pos=240;
+--enable_query_log
+
diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc
index 6d8c8196102..a55ac983a52 100644
--- a/mysql-test/include/show_binlog_events.inc
+++ b/mysql-test/include/show_binlog_events.inc
@@ -3,7 +3,7 @@
#
# Useage:
# let $binlog_file= master-bin.000002;
-# let $binlog_start= 106;
+# let $binlog_start= 240;
# let $binlog_limit= 1, 3;
# source include/show_binlog_events.inc;
#
diff --git a/mysql-test/include/show_binlog_events2.inc b/mysql-test/include/show_binlog_events2.inc
index 5dd272c562d..96e42e93f90 100644
--- a/mysql-test/include/show_binlog_events2.inc
+++ b/mysql-test/include/show_binlog_events2.inc
@@ -1,4 +1,4 @@
---let $binlog_start=106
+--let $binlog_start=240
--replace_result $binlog_start <binlog_start>
--replace_column 2 # 5 #
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/