Commit f5106b3f authored by mats@kindahl-laptop.dnsalias.net's avatar mats@kindahl-laptop.dnsalias.net
Browse files

Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl

into  kindahl-laptop.dnsalias.net:/home/bkroot/mysql-5.1-rpl
parents afc90970 68a52c42
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -70,9 +70,10 @@ select * from t2 /* must be (1,2), (2,2) */;
a	b
1	2
2	2
show master status  /* must have the update event more to FD */;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	211		
must have the update event more to FD
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	use `test`; update t2 set b=b + bug27563(b) order by a
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
is not null;
@@ -98,9 +99,9 @@ select * from t2 /* must be (1,2), (2,2) */;
a	b
1	1
2	2
show master status  /* must have the update event more to FD */;
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
master-bin.000001	98		
must have the update event more to FD
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
is not null;
+33 −0
Original line number Diff line number Diff line
drop table if exists t1,t2;
create table t1  (a int) engine=MyISAM;
insert into t1 set a=1;
reset master;
update t1 set a=2 /* will be "killed" after work has been done */;
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
is not null;
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
is not null
1
select 1 /* must return 1 as query completed before got killed*/;
1
1
create table t2 (a int, b int) ENGINE=MyISAM;
reset master;
load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
ERROR 70100: Query execution was interrupted
show binlog events from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Begin_load_query	#	#	;file_id=1;block_len=12
master-bin.000001	#	Execute_load_query	#	#	use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=1
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
is not null;
(@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
is not null
1
select 0 /* must return 0 to mean the killed query is in */;
0
0
drop table t1,t2;
end of the tests
+6 −4
Original line number Diff line number Diff line
@@ -216,11 +216,12 @@ connection con2;
--error ER_QUERY_INTERRUPTED
reap;
select * from t2 /* must be (1,2), (2,2) */;
show master status  /* must have the update event more to FD */;
--echo must have the update event more to FD
source include/show_binlog_events.inc;

# a proof the query is binlogged with an error

--exec $MYSQL_BINLOG --start-position=98 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--exec $MYSQL_BINLOG --start-position=106 $MYSQLTEST_VARDIR/log/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"))
@@ -256,11 +257,12 @@ connection con2;
--error ER_QUERY_INTERRUPTED
reap;
select * from t2 /* must be (1,2), (2,2) */;
show master status  /* must have the update event more to FD */;
--echo must have the update event more to FD
source include/show_binlog_events.inc;

# a proof the query is binlogged with an error

--exec $MYSQL_BINLOG --start-position=98 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
--exec $MYSQL_BINLOG --start-position=106 $MYSQLTEST_VARDIR/log/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"))
+5 −2
Original line number Diff line number Diff line
-- source include/have_binlog_format_mixed_or_statement.inc
#
# bug#27571 asynchronous setting mysql_$query()'s local error and 
#           Query_log_event::error_code
@@ -18,8 +19,10 @@ reset master;
update t1 set a=2 /* will be "killed" after work has been done */;

# a proof the query is binlogged with no error

--exec $MYSQL_BINLOG --start-position=98 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog
#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.
--exec $MYSQL_BINLOG --start-position=106 $MYSQLTEST_VARDIR/log/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"))
Loading