MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:Heikki Tuuri Date:September 4 2005 10:14pm
Subject:bk commit into 5.0 tree (heikki:1.1955) BUG#12308
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of heikki. When heikki 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
  1.1955 05/09/05 01:13:44 heikki@stripped +2 -0
  row0mysql.c, ha_innodb.cc:
    Fix bug #12308 : do not roll back the whhole transaction in a lock wait timeout error, just roll back the latest SQL statement; note that the locks set in the latest SQL statements remain, as InnoDB does not know what locks were set in which SQL statement

  innobase/row/row0mysql.c
    1.112 05/09/05 01:13:05 heikki@stripped +3 -2
    Fix bug #12308 : do not roll back the whhole transaction in a lock wait timeout error, just roll back the latest SQL statement; note that the locks set in the latest SQL statements remain, as InnoDB does not know what locks were set in which SQL statement

  sql/ha_innodb.cc
    1.254 05/09/05 01:12:53 heikki@stripped +3 -7
    Fix bug #12308 : do not roll back the whhole transaction in a lock wait timeout error, just roll back the latest SQL statement; note that the locks set in the latest SQL statements remain, as InnoDB does not know what locks were set in which SQL statement

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	heikki
# Host:	hundin.mysql.fi
# Root:	/home/heikki/mysql-5.0

--- 1.111/innobase/row/row0mysql.c	2005-07-01 22:52:31 +03:00
+++ 1.112/innobase/row/row0mysql.c	2005-09-05 01:13:05 +03:00
@@ -513,14 +513,15 @@
 
 		return(TRUE);
 
-	} else if (err == DB_DEADLOCK || err == DB_LOCK_WAIT_TIMEOUT
+	} else if (err == DB_DEADLOCK
 		   || err == DB_LOCK_TABLE_FULL) {
 		/* Roll back the whole transaction; this resolution was added
 		to version 3.23.43 */
 
 		trx_general_rollback_for_mysql(trx, FALSE, NULL);
 				
-	} else if (err == DB_OUT_OF_FILE_SPACE) {
+	} else if (err == DB_OUT_OF_FILE_SPACE
+		   || err == DB_LOCK_WAIT_TIMEOUT) {
            	if (savept) {
 			/* Roll back the latest, possibly incomplete
 			insertion or update */

--- 1.253/sql/ha_innodb.cc	2005-09-04 12:59:41 +03:00
+++ 1.254/sql/ha_innodb.cc	2005-09-05 01:12:53 +03:00
@@ -463,13 +463,9 @@
 
  	} else if (error == (int) DB_LOCK_WAIT_TIMEOUT) {
 
-		/* Since we rolled back the whole transaction, we must
-		tell it also to MySQL so that MySQL knows to empty the
-		cached binlog for this transaction */
-
-		if (thd) {
-			ha_rollback(thd);
-		}
+		/* Starting from 5.0.13, we let MySQL just roll back the
+		latest SQL statement in a lock wait timeout. Previously, we
+		rolled back the whole transaction. */
 
    		return(HA_ERR_LOCK_WAIT_TIMEOUT);
 
Thread
bk commit into 5.0 tree (heikki:1.1955) BUG#12308Heikki Tuuri4 Sep