summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/binlog_stm_binlog.result12
-rw-r--r--mysql-test/r/mysqltest.result8
-rw-r--r--mysql-test/t/binlog_stm_binlog.test12
-rw-r--r--mysql-test/t/mysqltest.test10
4 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/r/binlog_stm_binlog.result b/mysql-test/r/binlog_stm_binlog.result
index 80de6b6eaa9..ac4ca23782d 100644
--- a/mysql-test/r/binlog_stm_binlog.result
+++ b/mysql-test/r/binlog_stm_binlog.result
@@ -1,3 +1,15 @@
+create table t1 (a int, b int) engine=innodb;
+begin;
+insert into t1 values (1,2);
+commit;
+show binlog events;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.7-beta-debug-log, Binlog ver: 4
+master-bin.000001 102 Query 1 209 use `test`; create table t1 (a int, b int) engine=innodb
+master-bin.000001 209 Query 1 277 use `test`; BEGIN
+master-bin.000001 277 Query 1 90 use `test`; insert into t1 values (1,2)
+master-bin.000001 367 Xid 1 394 COMMIT /* XID */
+drop table t1;
drop table if exists t1, t2;
reset master;
create table t1 (a int) engine=bdb;
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index ac432b7b902..2ef005f4ceb 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -439,3 +439,11 @@ mysqltest: At line 1: Error parsing replace_regex "a "
mysqltest: At line 1: Error parsing replace_regex "a b"
mysqltest: At line 1: Error parsing replace_regex "/a b c"
mysqltest: At line 1: Error parsing replace_regex "/a /b c "
+create table t1 (a int, b int);
+insert into t1 values (1,3);
+insert into t1 values (2,4);
+select * from t1;
+a D
+1 1
+1 4
+drop table t1;
diff --git a/mysql-test/t/binlog_stm_binlog.test b/mysql-test/t/binlog_stm_binlog.test
index 6d3dce9a323..d608741da0b 100644
--- a/mysql-test/t/binlog_stm_binlog.test
+++ b/mysql-test/t/binlog_stm_binlog.test
@@ -1,6 +1,18 @@
+# REQUIREMENT
+# replace_regex should replace output of SHOW BINLOG EVENTS
+
+create table t1 (a int, b int) engine=innodb;
+begin;
+insert into t1 values (1,2);
+commit;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\//
+show binlog events;
+drop table t1;
+
# This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
-- source include/have_binlog_format_statement.inc
-- source extra/binlog_tests/binlog.test
+
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index d374ac822c4..271d6fb783e 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1097,3 +1097,13 @@ select "strawberry","blueberry","potato";
--exec echo "--replace_regex /a b c" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_regex /a /b c ;" | $MYSQL_TEST 2>&1
+
+# REQUIREMENT
+# replace_regex should replace substitutions from left to right in output
+
+create table t1 (a int, b int);
+insert into t1 values (1,3);
+insert into t1 values (2,4);
+--replace_regex /A/C/ /B/D/i /3/2/ /2/1/
+select * from t1;
+drop table t1;