List:Commits« Previous MessageNext Message »
From:marko.makela Date:November 7 2011 12:10pm
Subject:bzr push into mysql-5.5 branch (marko.makela:3595 to 3596)
View as plain text  
 3596 Marko Mäkelä	2011-11-07 [merge]
      Merge mysql-5.1 to mysql-5.5.

    modified:
      storage/innobase/handler/ha_innodb.cc
 3595 Marko Mäkelä	2011-11-07
      Bug#13340047 LATCHING ORDER VIOLATION IN IBUF_SET_ENTRY_COUNTER()
      
      ibuf_insert_low(), the only caller of ibuf_set_entry_counter(), will
      have latched an insert buffer bitmap page in bitmap_mtr before
      invoking ibuf_set_entry_counter(). The latching order forbids any
      further pages to be latched.
      
      ibuf_set_entry_counter(): Renamed to ibuf_get_entry_counter(),
      simplified the code and added comments.
      
      Added the following symbols for predefined field numbers in change
      buffer records:
      
      #define IBUF_REC_FIELD_SPACE	0	/*!< in the pre-4.1 format,
      					the page number. later, the space_id */
      #define IBUF_REC_FIELD_MARKER	1	/*!< starting with 4.1, a marker
      					consisting of 1 byte that is 0 */
      #define IBUF_REC_FIELD_PAGE	2	/*!< starting with 4.1, the
      					page number */
      #define IBUF_REC_FIELD_METADATA	3	/* the metadata field */
      #define IBUF_REC_FIELD_USER	4	/* first user field */
      
      rb:802 approved by Sunny Bains

    modified:
      storage/innobase/ibuf/ibuf0ibuf.c
=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	revid:marko.makela@strippedejlpub0rjkd
+++ b/storage/innobase/handler/ha_innodb.cc	revid:marko.makela@strippedkhn
@@ -5700,6 +5700,7 @@ ha_innobase::index_read(
 			(byte*) key_ptr,
 			(ulint) key_len,
 			prebuilt->trx);
+		DBUG_ASSERT(prebuilt->search_tuple->n_fields > 0);
 	} else {
 		/* We position the cursor to the last or the first entry
 		in the index */
@@ -7527,6 +7528,7 @@ ha_innobase::records_in_range(
 	mem_heap_t*	heap;
 
 	DBUG_ENTER("records_in_range");
+	DBUG_ASSERT(min_key || max_key);
 
 	ut_a(prebuilt->trx == thd_to_trx(ha_thd()));
 
@@ -7576,6 +7578,9 @@ ha_innobase::records_in_range(
 					 (const uchar*) 0),
 				(ulint) (min_key ? min_key->length : 0),
 				prebuilt->trx);
+	DBUG_ASSERT(min_key
+		    ? range_start->n_fields > 0
+		    : range_start->n_fields == 0);
 
 	row_sel_convert_mysql_key_to_innobase(
 				range_end, (byte*) key_val_buff2,
@@ -7584,6 +7589,9 @@ ha_innobase::records_in_range(
 					 (const uchar*) 0),
 				(ulint) (max_key ? max_key->length : 0),
 				prebuilt->trx);
+	DBUG_ASSERT(max_key
+		    ? range_end->n_fields > 0
+		    : range_end->n_fields == 0);
 
 	mode1 = convert_search_mode_to_innobase(min_key ? min_key->flag :
 						HA_READ_KEY_EXACT);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (marko.makela:3595 to 3596) marko.makela7 Nov