List:Internals« Previous MessageNext Message »
From:Marko Mäkelä Date:April 22 2005 12:15pm
Subject:bk commit into 5.0 tree (marko:1.1860)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of marko. When marko 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.1860 05/04/22 15:15:18 marko@stripped +4 -0
  row0upd.c:
    Add UNIV_UNLIKELY hint.
  lock0lock.c:
    Correct the prototypes of lock_deadlock_recursive() and
    lock_deadlock_occurs().
  data0data.c:
    dtuple_convert_big_rec(): Add UNIV_UNLIKELY hint.
  ha_innodb.cc:
    ha_innobase::write_row(): Correct the type of 'mode'.

  innobase/row/row0upd.c
    1.36 05/04/22 15:06:12 marko@stripped +1 -1
    Add UNIV_UNLIKELY hint.

  innobase/lock/lock0lock.c
    1.57 05/04/22 14:59:00 marko@stripped +13 -4
    Correct the prototypes of lock_deadlock_recursive() and
    lock_deadlock_occurs().

  innobase/data/data0data.c
    1.17 05/04/22 14:49:46 marko@stripped +1 -1
    dtuple_convert_big_rec(): Add UNIV_UNLIKELY hint.

  sql/ha_innodb.cc
    1.198 05/04/22 14:07:34 marko@stripped +1 -1
    ha_innobase::write_row(): Correct the type of 'mode'.

# 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:	marko
# Host:	hundin.mysql.fi
# Root:	/home/marko/mysql-5.0

--- 1.16/innobase/data/data0data.c	Wed Mar 16 17:58:01 2005
+++ 1.17/innobase/data/data0data.c	Fri Apr 22 14:49:46 2005
@@ -502,7 +502,7 @@
 
 	size = rec_get_converted_size(index, entry);
 
-	if (size > 1000000000) {
+	if (UNIV_UNLIKELY(size > 1000000000)) {
 		fprintf(stderr,
 "InnoDB: Warning: tuple size very big: %lu\n", (ulong) size);
 		fputs("InnoDB: Tuple contents: ", stderr);

--- 1.56/innobase/lock/lock0lock.c	Thu Apr 21 14:23:17 2005
+++ 1.57/innobase/lock/lock0lock.c	Fri Apr 22 14:59:00 2005
@@ -348,17 +348,26 @@
 ibool
 lock_deadlock_occurs(
 /*=================*/
-			/* out: TRUE if a deadlock was detected */
+			/* out: TRUE if a deadlock was detected and we
+			chose trx as a victim; FALSE if no deadlock, or
+			there was a deadlock, but we chose other
+			transaction(s) as victim(s) */
 	lock_t*	lock,	/* in: lock the transaction is requesting */
 	trx_t*	trx);	/* in: transaction */
 /************************************************************************
 Looks recursively for a deadlock. */
 static
-ibool
+ulint
 lock_deadlock_recursive(
 /*====================*/
-				/* out: TRUE if a deadlock was detected
-				or the calculation took too long */
+				/* out: 0 if no deadlock found,
+				LOCK_VICTIM_IS_START if there was a deadlock
+				and we chose 'start' as the victim,
+				LOCK_VICTIM_IS_OTHER if a deadlock
+				was found and we chose some other trx as a
+				victim: we must do the search again in this
+				last case because there may be another
+				deadlock! */
 	trx_t*	start,		/* in: recursion starting point */
 	trx_t*	trx,		/* in: a transaction waiting for a lock */
 	lock_t*	wait_lock,	/* in: the lock trx is waiting to be granted */

--- 1.35/innobase/row/row0upd.c	Thu Apr 21 14:23:18 2005
+++ 1.36/innobase/row/row0upd.c	Fri Apr 22 15:06:12 2005
@@ -1270,7 +1270,7 @@
 
 	rec = btr_cur_get_rec(btr_cur);
 
-	if (!found) {
+	if (UNIV_UNLIKELY(!found)) {
 		fputs("InnoDB: error in sec index entry update in\n"
 			"InnoDB: ", stderr);
 		dict_index_name_print(stderr, trx, index);

--- 1.197/sql/ha_innodb.cc	Thu Apr 21 15:15:54 2005
+++ 1.198/sql/ha_innodb.cc	Fri Apr 22 14:07:34 2005
@@ -2834,7 +2834,7 @@
 		being blocked by a MySQL table lock TL_WRITE_ALLOW_READ. */
 
 		dict_table_t*	src_table;
-		ibool		mode;
+		ulint		mode;
 
 		num_write_row = 0;
 
Thread
bk commit into 5.0 tree (marko:1.1860)Marko Mäkelä22 Apr