List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:October 31 2007 10:48am
Subject:bk commit into 5.1 tree (aelkin:1.2605) BUG#27571
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of elkin. When elkin does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-10-31 11:48:49+02:00, aelkin@stripped +7 -0
  bug#27571 merging. Fixing offsets and moving tests to the corrent
  destination. Removing wrong (local temp) tests.

  BitKeeper/deleted/.del-binlog_killed_bug27571-master.opt@stripped, 2007-10-31 11:44:30+02:00, aelkin@stripped +0 -0
    Delete: mysql-test/t/binlog_killed_bug27571-master.opt

  BitKeeper/deleted/.del-binlog_killed_bug27571.test@stripped, 2007-10-31 11:44:23+02:00, aelkin@stripped +0 -0
    Delete: mysql-test/t/binlog_killed_bug27571.test

  mysql-test/suite/binlog/r/binlog_killed.result@stripped, 2007-10-31 11:48:43+02:00, aelkin@stripped +7 -6
    results changed

  mysql-test/suite/binlog/r/binlog_killed_simulate.result@stripped, 2007-10-31 11:48:43+02:00, aelkin@stripped +33 -0
    new results file

  mysql-test/suite/binlog/r/binlog_killed_simulate.result@stripped, 2007-10-31 11:48:43+02:00, aelkin@stripped +0 -0

  mysql-test/suite/binlog/t/binlog_killed.test@stripped, 2007-10-31 11:48:43+02:00, aelkin@stripped +6 -4
    binlog offset made 5.1 specific

  mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt@stripped, 2007-10-31 11:32:05+02:00, aelkin@stripped +0 -0
    Rename: mysql-test/t/binlog_killed_simulate-master.opt -> mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt

  mysql-test/suite/binlog/t/binlog_killed_simulate.test@stripped, 2007-10-31 11:48:43+02:00, aelkin@stripped +5 -2
    binlog offset + guard to run the test with stmt/mixed format

  mysql-test/suite/binlog/t/binlog_killed_simulate.test@stripped, 2007-10-31 11:31:45+02:00, aelkin@stripped +0 -0
    Rename: mysql-test/t/binlog_killed_simulate.test -> mysql-test/suite/binlog/t/binlog_killed_simulate.test

diff -Nrup a/mysql-test/suite/binlog/r/binlog_killed.result b/mysql-test/suite/binlog/r/binlog_killed.result
--- a/mysql-test/suite/binlog/r/binlog_killed.result	2007-10-30 10:51:07 +02:00
+++ b/mysql-test/suite/binlog/r/binlog_killed.result	2007-10-31 11:48:43 +02:00
@@ -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;
diff -Nrup a/mysql-test/suite/binlog/r/binlog_killed_simulate.result b/mysql-test/suite/binlog/r/binlog_killed_simulate.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/binlog/r/binlog_killed_simulate.result	2007-10-31 11:48:43 +02:00
@@ -0,0 +1,33 @@
+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
diff -Nrup a/mysql-test/suite/binlog/t/binlog_killed.test b/mysql-test/suite/binlog/t/binlog_killed.test
--- a/mysql-test/suite/binlog/t/binlog_killed.test	2007-10-30 10:51:07 +02:00
+++ b/mysql-test/suite/binlog/t/binlog_killed.test	2007-10-31 11:48:43 +02:00
@@ -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"))
diff -Nrup a/mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt b/mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate-master.opt	2007-10-31 11:32:05 +02:00
@@ -0,0 +1 @@
+--loose-debug=d,simulate_kill_bug27571
diff -Nrup a/mysql-test/suite/binlog/t/binlog_killed_simulate.test b/mysql-test/suite/binlog/t/binlog_killed_simulate.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test	2007-10-31 11:48:43 +02:00
@@ -0,0 +1,68 @@
+-- source include/have_binlog_format_mixed_or_statement.inc
+#
+# bug#27571 asynchronous setting mysql_$query()'s local error and 
+#           Query_log_event::error_code
+#
+
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
+#
+#  Checking that killing upon successful row-loop does not affect binlogging
+#
+
+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 */;
+
+# 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.
+--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"))
+is not null;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+let $error_code= `select @a like "%#%error_code=0%" /* must return 1 */`;
+eval select $error_code /* must return 1 as query completed before got killed*/;
+
+# cleanup for the sub-case
+system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
+
+
+#
+#  Checking that killing inside of row-loop for LOAD DATA into
+#  non-transactional table affects binlogging
+#
+
+create table t2 (a int, b int) ENGINE=MyISAM;
+reset master;
+--error ER_QUERY_INTERRUPTED
+load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
+
+
+# a proof the query is binlogged with an error
+
+source include/show_binlog_events.inc;
+
+--exec $MYSQL_BINLOG --start-position=98 $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"))
+is not null;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
+eval select $error_code /* must return 0 to mean the killed query is in */;
+
+# cleanup for the sub-case
+system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
+
+
+drop table t1,t2;
+
+--echo end of the tests
diff -Nrup a/mysql-test/t/binlog_killed_bug27571-master.opt b/mysql-test/t/binlog_killed_bug27571-master.opt
--- a/mysql-test/t/binlog_killed_bug27571-master.opt	2007-10-29 15:20:55 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1 +0,0 @@
---loose-debug=d,stop_after_row_loop_done
diff -Nrup a/mysql-test/t/binlog_killed_bug27571.test b/mysql-test/t/binlog_killed_bug27571.test
--- a/mysql-test/t/binlog_killed_bug27571.test	2007-10-29 15:20:56 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,68 +0,0 @@
---source include/have_innodb.inc
---source include/not_embedded.inc
---source include/have_log_bin.inc
-
-#
-# bug#27571 asynchronous setting mysql_`query`::error and Query_log_e::error_code
-# 
-# Checking that if killing happens inbetween of the end of rows loop and
-# recording into binlog that will not lead to recording any error incl 
-# the killed error.
-#
-
-connect (looser, localhost, root,,);
-connect (killer, localhost, root,,);
-
-create table t1 (a int auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB;
-
-delete from t1;
-insert into t1 values (1,1),(2,2);
-reset master;
-
-connection looser;
-let $ID= `select connection_id()`;
-send update t1 set b=11 where a=2;
-
-connection killer;
-sleep 1; # let 1 second for the update to get to the sleeping point
---replace_result $ID ID
-eval kill query $ID;
-
-connection looser;
---error 0 # zero even though the query must be got killed while it was sleepin for 5 secs
-reap;
-
-#
-# this is another possible artifact. The killed error was not caught
-# as that is logical as killing was not effective:
-# data are ok and well as binlog event is without killed error (further).
-# The reason of the following `show error' is to prove that 
-# killing simulation was effective
-#
-show errors; 
-
-connection killer;
-
-# nothing is rolled back
-
-select * from t1 where a=2 /* must be 11 */;
-
-# 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
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval select
-(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
-let $error_code= `select @a like "%#%error_code=0%"`;
-
-eval select $error_code  /* must return 1*/;
-
-#
-# cleanup
-#
-
-drop table t1;
-
---echo end of the tests
diff -Nrup a/mysql-test/t/binlog_killed_simulate-master.opt b/mysql-test/t/binlog_killed_simulate-master.opt
--- a/mysql-test/t/binlog_killed_simulate-master.opt	2007-10-29 15:20:56 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1 +0,0 @@
---loose-debug=d,simulate_kill_bug27571
diff -Nrup a/mysql-test/t/binlog_killed_simulate.test b/mysql-test/t/binlog_killed_simulate.test
--- a/mysql-test/t/binlog_killed_simulate.test	2007-10-29 15:20:56 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,65 +0,0 @@
-#
-# bug#27571 asynchronous setting mysql_$query()'s local error and 
-#           Query_log_event::error_code
-#
-
---disable_warnings
-drop table if exists t1,t2;
---enable_warnings
-
-#
-#  Checking that killing upon successful row-loop does not affect binlogging
-#
-
-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 */;
-
-# 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
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval select
-(@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog"))
-is not null;
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
-let $error_code= `select @a like "%#%error_code=0%" /* must return 1 */`;
-eval select $error_code /* must return 1 as query completed before got killed*/;
-
-# cleanup for the sub-case
-system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
-
-
-#
-#  Checking that killing inside of row-loop for LOAD DATA into
-#  non-transactional table affects binlogging
-#
-
-create table t2 (a int, b int) ENGINE=MyISAM;
-reset master;
---error ER_QUERY_INTERRUPTED
-load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */;
-
-
-# a proof the query is binlogged with an error
-
-source include/show_binlog_events.inc;
-
---exec $MYSQL_BINLOG --start-position=98 $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"))
-is not null;
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
-let $error_code= `select @a like "%#%error_code=0%" /* must return 0*/`;
-eval select $error_code /* must return 0 to mean the killed query is in */;
-
-# cleanup for the sub-case
-system rm $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog;
-
-
-drop table t1,t2;
-
---echo end of the tests
Thread
bk commit into 5.1 tree (aelkin:1.2605) BUG#27571Andrei Elkin31 Oct