MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:May 13 2010 7:50am
Subject:bzr commit into mysql-trunk-innodb branch (vasil.dimov:3094) Bug#51920
View as plain text  
#At file:///usr/local/devel/bzrroot/server/mysql-trunk-innodb/ based on revid:vasil.dimov@stripped

 3094 Vasil Dimov	2010-05-13
      Followup to Bug#51920, fix binlog.binlog_killed
      
      This is a followup to the fix of
      
      Bug#51920 Innodb connections in row lock wait ignore KILL until lock wait
      timeout
      
      in that fix (rb://279) the behavior was changed to honor when a trx is
      interrupted during lock wait, but the returned error code was still
      "lock wait timeout" when it should be "interrupted".
      
      This change fixes the non-deterministically failing test binlog.binlog_killed,
      that failed like this:
      
      binlog.binlog_killed 'stmt'              [ fail ]
              Test ended at 2010-05-12 11:39:08
      
      CURRENT_TEST: binlog.binlog_killed
      mysqltest: At line 208: query 'reap' failed with wrong errno 1205: 'Lock wait timeout exceeded; try restarting transaction', instead of 0...
      
      Approved by:	Sunny Bains (rb://344)

    modified:
      storage/innobase/row/row0mysql.c
      storage/innobase/srv/srv0srv.c
=== modified file 'storage/innobase/row/row0mysql.c'
--- a/storage/innobase/row/row0mysql.c	revid:vasil.dimov@stripped
+++ b/storage/innobase/row/row0mysql.c	revid:vasil.dimov@stripped
@@ -522,6 +522,7 @@ handle_new_error:
 	case DB_CANNOT_ADD_CONSTRAINT:
 	case DB_TOO_MANY_CONCURRENT_TRXS:
 	case DB_OUT_OF_FILE_SPACE:
+	case DB_INTERRUPTED:
 		if (savept) {
 			/* Roll back the latest, possibly incomplete
 			insertion or update */

=== modified file 'storage/innobase/srv/srv0srv.c'
--- a/storage/innobase/srv/srv0srv.c	revid:vasil.dimov@stripped
+++ b/storage/innobase/srv/srv0srv.c	revid:vasil.dimov@stripped
@@ -1644,12 +1644,16 @@ srv_suspend_mysql_thread(
 	innodb_lock_wait_timeout, because trx->mysql_thd == NULL. */
 	lock_wait_timeout = thd_lock_wait_timeout(trx->mysql_thd);
 
-	if (trx_is_interrupted(trx)
-	    || (lock_wait_timeout < 100000000
-		&& wait_time > (double) lock_wait_timeout)) {
+	if (lock_wait_timeout < 100000000
+	    && wait_time > (double) lock_wait_timeout) {
 
 		trx->error_state = DB_LOCK_WAIT_TIMEOUT;
 	}
+
+	if (trx_is_interrupted(trx)) {
+
+		trx->error_state = DB_INTERRUPTED;
+	}
 }
 
 /********************************************************************//**


Attachment: [text/bzr-bundle] bzr/vasil.dimov@oracle.com-20100513074652-0cvlhgkesgbb2bfh.bundle
Thread
bzr commit into mysql-trunk-innodb branch (vasil.dimov:3094) Bug#51920vasil.dimov13 May