6
6
# Query_log_event::error_code
7
7
#
8
8
9
- --disable_warnings
10
- drop table if exists t1,t2;
11
- --enable_warnings
12
-
13
9
#
14
10
# Checking that killing upon successful row-loop does not affect binlogging
15
11
#
@@ -21,20 +17,16 @@ reset master;
21
17
update t1 set a=2 /* will be "killed" after work has been done */;
22
18
23
19
# a proof the query is binlogged with no error
24
- let $MYSQLD_DATADIR = `select @@datadir`;
25
- --exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_start_pos $MYSQLD_DATADIR /master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
20
+ let datadir = `select @@datadir`;
21
+ --exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_start_pos $datadir /master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
26
22
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
27
- eval select
28
- (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
29
- is not null;
23
+ eval set @a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog");
30
24
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
31
- let $error_code= `select @a like "%#%error_code=0%" /* must return 1 */`;
32
- eval select $error_code /* must return 1 as query completed before got killed*/;
25
+ select @a like '%#%error_code=0%' /* must return 1 as query completed before got killed*/;
33
26
34
27
# cleanup for the sub-case
35
28
remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
36
29
37
-
38
30
#
39
31
# Checking that killing inside of row-loop for LOAD DATA into
40
32
# non-transactional table affects binlogging
@@ -46,21 +38,17 @@ reset master;
46
38
load data infile '../../std_data/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
47
39
48
40
# a proof the query is binlogged with an error
49
- --let $ binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 5)
50
- --let $ binlog_end= query_get_value(SHOW BINLOG EVENTS, Pos, 6)
41
+ --let binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 5)
42
+ --let binlog_end= query_get_value(SHOW BINLOG EVENTS, Pos, 6)
51
43
source include/show_binlog_events.inc;
52
44
53
-
54
45
--mkdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571
55
- --exec $MYSQL_BINLOG --local-load=$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 --force-if-open --start-position=$binlog_load_data --stop-position=$binlog_end $MYSQLD_DATADIR /master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
46
+ --exec $MYSQL_BINLOG --local-load=$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 --force-if-open --start-position=$binlog_load_data --stop-position=$binlog_end $datadir /master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
56
47
57
48
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
58
- eval select
59
- (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
60
- is not null;
49
+ eval set @a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog");
61
50
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
62
- let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
63
- eval select $error_code /* must return 0 to mean the killed query is in */;
51
+ select @a like '%#%error_code=0%' /* must return 0 to mean the killed query is in */;
64
52
65
53
# cleanup for the sub-case
66
54
remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
0 commit comments