List:Internals« Previous MessageNext Message »
From:Heikki Tuuri Date:April 6 2005 9:27am
Subject:bk commit into 4.1 tree (heikki:1.2164)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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.2164 05/04/06 10:27:40 heikki@stripped +4 -0
  row0sel.c, btr0pcur.c, btr0pcur.ic, btr0pcur.h:
    Add diagnostic code to track assertion failure in ut_a(cursor->old_stored ==
BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other
context

  innobase/row/row0sel.c
    1.67 05/04/06 10:27:08 heikki@stripped +4 -0
    Add diagnostic code to track assertion failure in ut_a(cursor->old_stored ==
BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other
context

  innobase/btr/btr0pcur.c
    1.10 05/04/06 10:26:29 heikki@stripped +9 -1
    Add diagnostic code to track assertion failure in ut_a(cursor->old_stored ==
BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other
context

  innobase/include/btr0pcur.ic
    1.6 05/04/06 10:26:13 heikki@stripped +10 -0
    Add diagnostic code to track assertion failure in ut_a(cursor->old_stored ==
BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other
context

  innobase/include/btr0pcur.h
    1.6 05/04/06 10:26:02 heikki@stripped +4 -0
    Add diagnostic code to track assertion failure in ut_a(cursor->old_stored ==
BTR_PCUR_OLD_STORED); the failure happened in OPTIMIZE TABLE, and in 4.0.24 in some other
context

# 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-4.1

--- 1.9/innobase/btr/btr0pcur.c	Tue Mar 16 03:01:32 2004
+++ 1.10/innobase/btr/btr0pcur.c	Wed Apr  6 10:26:29 2005
@@ -14,6 +14,7 @@
 
 #include "ut0byte.h"
 #include "rem0cmp.h"
+#include "trx0trx.h"
 
 /******************************************************************
 Allocates memory for a persistent cursor object and initializes the cursor. */
@@ -203,7 +204,14 @@
 
 	ut_a(cursor->pos_state == BTR_PCUR_WAS_POSITIONED
 			|| cursor->pos_state == BTR_PCUR_IS_POSITIONED);
-	ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED);
+	if (cursor->old_stored != BTR_PCUR_OLD_STORED) {
+		ut_print_buf(stderr, (const byte*)cursor, sizeof(btr_pcur_t));
+		if (cursor->trx_if_known) {
+			trx_print(stderr, cursor->trx_if_known);
+		}
+		
+		ut_a(0);
+	}
 
 	if (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE
 	    || cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE) {

--- 1.5/innobase/include/btr0pcur.h	Mon Jan  6 21:43:08 2003
+++ 1.6/innobase/include/btr0pcur.h	Wed Apr  6 10:26:02 2005
@@ -477,6 +477,10 @@
 					BTR_PCUR_WAS_POSITIONED,
 					BTR_PCUR_NOT_POSITIONED */
 	ulint		search_mode;	/* PAGE_CUR_G, ... */
+	trx_t*		trx_if_known;	/* the transaction, if we know it;
+					otherwise this field is not defined;
+					can ONLY BE USED in error prints in
+					fatal assertion failures! */
 	/*-----------------------------*/
 	/* NOTE that the following fields may possess dynamically allocated
 	memory which should be freed if not needed anymore! */

--- 1.5/innobase/include/btr0pcur.ic	Tue Oct  7 17:19:30 2003
+++ 1.6/innobase/include/btr0pcur.ic	Wed Apr  6 10:26:13 2005
@@ -493,6 +493,8 @@
 	btr_cur_search_to_nth_level(index, 0, tuple, mode, latch_mode,
 							btr_cursor, 0, mtr);
 	cursor->pos_state = BTR_PCUR_IS_POSITIONED;
+
+	cursor->trx_if_known = NULL;
 }
 
 /******************************************************************
@@ -535,6 +537,8 @@
 	cursor->pos_state = BTR_PCUR_IS_POSITIONED;
 
 	cursor->old_stored = BTR_PCUR_OLD_NOT_STORED;
+
+	cursor->trx_if_known = NULL;
 }
 
 /*********************************************************************
@@ -568,6 +572,8 @@
 	pcur->pos_state = BTR_PCUR_IS_POSITIONED;
 
 	pcur->old_stored = BTR_PCUR_OLD_NOT_STORED;
+
+	pcur->trx_if_known = NULL;
 }
 
 /**************************************************************************
@@ -592,6 +598,8 @@
 					btr_pcur_get_btr_cur(cursor), mtr);
 	cursor->pos_state = BTR_PCUR_IS_POSITIONED;
 	cursor->old_stored = BTR_PCUR_OLD_NOT_STORED;
+
+	cursor->trx_if_known = NULL;
 }
 	
 /******************************************************************
@@ -617,4 +625,6 @@
 	
 	cursor->latch_mode = BTR_NO_LATCHES;
 	cursor->pos_state = BTR_PCUR_NOT_POSITIONED;
+
+	cursor->trx_if_known = NULL;
 }

--- 1.66/innobase/row/row0sel.c	Mon Mar  7 12:03:27 2005
+++ 1.67/innobase/row/row0sel.c	Wed Apr  6 10:27:08 2005
@@ -2507,6 +2507,8 @@
 
 	clust_rec = btr_pcur_get_rec(prebuilt->clust_pcur);
 
+	prebuilt->clust_pcur->trx_if_known = trx;
+
 	/* Note: only if the search ends up on a non-infimum record is the
 	low_match value the real match to the search tuple */
 
@@ -3222,6 +3224,8 @@
 		btr_pcur_open_with_no_init(index, search_tuple, mode,
 					BTR_SEARCH_LEAF,
 					pcur, 0, &mtr);
+
+		pcur->trx_if_known = trx;
 	} else {
 		if (mode == PAGE_CUR_G) {
 			btr_pcur_open_at_index_side(TRUE, index,
Thread
bk commit into 4.1 tree (heikki:1.2164)Heikki Tuuri6 Apr