From f0707b38ea64688735183f2e43927857236ca2ed Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 23 Oct 2010 11:50:02 +0200 Subject: [PATCH] MWL#116: Efficient group commit: Some fixes for test failures. client/mysqltest.cc: Apply Serg's work-around for MySQL BUG#57491. mysql-test/r/group_commit_binlog_pos.result: Accept different ways the server crash is detected. mysql-test/t/group_commit_binlog_pos.test: Accept different ways the server crash is detected. Skip in row-based binlogging, as otherwise the binlog offsets will be different. --- client/mysqltest.cc | 4 ++++ mysql-test/r/group_commit_binlog_pos.result | 6 +++--- mysql-test/t/group_commit_binlog_pos.test | 8 +++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index e4981bec997..78ae9a63f87 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -717,6 +717,10 @@ void handle_no_error(struct st_command*); #ifdef EMBEDDED_LIBRARY +/* workaround for MySQL BUG#57491 */ +#undef MY_WME +#define MY_WME 0 + /* attributes of the query thread */ pthread_attr_t cn_thd_attrib; diff --git a/mysql-test/r/group_commit_binlog_pos.result b/mysql-test/r/group_commit_binlog_pos.result index 0d7c23cbbbd..a0bb5ee2d8e 100644 --- a/mysql-test/r/group_commit_binlog_pos.result +++ b/mysql-test/r/group_commit_binlog_pos.result @@ -21,9 +21,9 @@ a 2 SET SESSION debug="+d,crash_dispatch_command_before"; SELECT 1; -ERROR HY000: Lost connection to MySQL server during query -ERROR HY000: Lost connection to MySQL server during query -ERROR HY000: Lost connection to MySQL server during query +Got one of the listed errors +Got one of the listed errors +Got one of the listed errors SELECT * FROM t1 ORDER BY a; a 0 diff --git a/mysql-test/t/group_commit_binlog_pos.test b/mysql-test/t/group_commit_binlog_pos.test index ad1a0e4b508..f8c5e719f11 100644 --- a/mysql-test/t/group_commit_binlog_pos.test +++ b/mysql-test/t/group_commit_binlog_pos.test @@ -1,6 +1,8 @@ --source include/have_debug_sync.inc --source include/have_innodb.inc --source include/have_log_bin.inc +--source include/have_binlog_format_mixed_or_statement.inc + # Need DBUG to crash the server intentionally --source include/have_debug.inc # Don't test this under valgrind, memory leaks will occur as we crash @@ -54,14 +56,14 @@ reap; connection default; system echo wait-group_commit_binlog_pos.test >> $MYSQLTEST_VARDIR/tmp/mysqld.1.expect; SET SESSION debug="+d,crash_dispatch_command_before"; ---error 2013 +--error 2006,2013 SELECT 1; connection con1; ---error 2013 +--error 2006,2013 reap; connection con3; ---error 2013 +--error 2006,2013 reap; system echo restart-group_commit_binlog_pos.test >> $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;