summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-15 18:24:15 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-15 18:24:15 +0100
commitd7304375e5e0ce30979c2b92e70eb0effaa30a25 (patch)
treebb9d05f40e948d4b027f4da9c007c433a16fa1a6 /mysql-test/suite/binlog
parentcd29dc98216d822ad701d604b3eda886e1db2aaa (diff)
parente0f3a0fae98bea144b962ef8dbbe62e0935aebb1 (diff)
downloadmariadb-git-d7304375e5e0ce30979c2b92e70eb0effaa30a25.tar.gz
mysql-5.1.73 merge
Diffstat (limited to 'mysql-test/suite/binlog')
-rw-r--r--mysql-test/suite/binlog/t/binlog_killed_simulate.test13
1 files changed, 7 insertions, 6 deletions
diff --git a/mysql-test/suite/binlog/t/binlog_killed_simulate.test b/mysql-test/suite/binlog/t/binlog_killed_simulate.test
index b87d47559fe..fcedd884183 100644
--- a/mysql-test/suite/binlog/t/binlog_killed_simulate.test
+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test
@@ -20,11 +20,9 @@ reset master;
update t1 set a=2 /* will be "killed" after work has been done */;
# a proof the query is binlogged with no error
-#todo: introduce a suite private macro that provides numeric values
-# for some constants like the offset of the first real event
-# that is different between severs versions.
+--let $binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 2)
let $MYSQLD_DATADIR= `select @@datadir`;
---exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_load_data $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
@@ -48,11 +46,12 @@ reset master;
load data infile '../../std_data/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
+--let $binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 2)
# a proof the query is binlogged with an error
-
source include/show_binlog_events.inc;
---exec $MYSQL_BINLOG --force-if-open --start-position=98 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
+--mkdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571
+--exec $MYSQL_BINLOG --local-load=$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 --force-if-open --start-position=$binlog_load_data $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
@@ -64,6 +63,8 @@ eval select $error_code /* must return 0 to mean the killed query is in */;
# cleanup for the sub-case
remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
+--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 *
+--rmdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571
drop table t1,t2;