List:Commits« Previous MessageNext Message »
From:marko.makela Date:October 21 2011 4:14am
Subject:bzr push into mysql-5.1 branch (marko.makela:3628 to 3629) Bug#13116045
View as plain text  
 3629 Marko Mäkelä	2011-10-21
      Bug#13116045 Compilation failure using GCC 4.6.1 in btr/btr0cur.c
      
      btr_record_not_null_field_in_rec(): Remove the parameter rec.
      Use rec_offs_nth_sql_null() instead of rec_get_nth_field().
      
      rb:788 approved by Jimmy Yang

    modified:
      storage/innobase/btr/btr0cur.c
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/btr/btr0cur.c
 3628 Bjorn Munch	2011-10-19
      Remove copyright header from parser_stack.test

    modified:
      mysql-test/t/parser_stack.test
=== modified file 'storage/innobase/btr/btr0cur.c'
--- a/storage/innobase/btr/btr0cur.c	revid:bjorn.munch@stripped7-2vj9rpd7gw9unyoj
+++ b/storage/innobase/btr/btr0cur.c	revid:marko.makela@strippedac6
@@ -2864,7 +2864,6 @@ static
 void
 btr_record_not_null_field_in_rec(
 /*=============================*/
-	rec_t*		rec,		/* in: physical record */
 	ulint		n_unique,	/* in: dict_index_get_n_unique(index),
 					number of columns uniquely determine
 					an index entry */
@@ -2883,17 +2882,11 @@ btr_record_not_null_field_in_rec(
 	}
 
 	for (i = 0; i < n_unique; i++) {
-		ulint	rec_len;
-		byte*	field;
-
-		field = rec_get_nth_field(rec, offsets, i, &rec_len);
-
-		if (rec_len != UNIV_SQL_NULL) {
-			n_not_null[i]++;
-		} else {
-			/* Break if we hit the first NULL value */
+		if (rec_offs_nth_sql_null(offsets, i)) {
 			break;
 		}
+
+		n_not_null[i]++;
 	}
 }
 
@@ -2988,7 +2981,7 @@ btr_estimate_number_of_different_key_val
 
 			if (n_not_null) {
 				btr_record_not_null_field_in_rec(
-					rec, n_cols, offsets_rec, n_not_null);
+					n_cols, offsets_rec, n_not_null);
 			}
 		}
 
@@ -3023,8 +3016,7 @@ btr_estimate_number_of_different_key_val
 
 			if (n_not_null) {
 				btr_record_not_null_field_in_rec(
-					next_rec, n_cols, offsets_next_rec,
-					n_not_null);
+					n_cols, offsets_next_rec, n_not_null);
 			}
 
 			total_external_size

=== modified file 'storage/innodb_plugin/ChangeLog'
--- a/storage/innodb_plugin/ChangeLog	revid:bjorn.munch@strippednyoj
+++ b/storage/innodb_plugin/ChangeLog	revid:marko.makela@stripped
@@ -1,3 +1,8 @@
+2011-10-20	The InnoDB Team
+
+	* btr/brt0cur.c:
+	Fix Bug#13116045 Compilation failure using GCC 4.6.1 in btr/btr0cur.c
+
 2011-10-12	The InnoDB Team
 
 	* btr/btr0cur.c, btr/btr0sea.c, buf/buf0buf.c, buf/buf0lru.c,

=== modified file 'storage/innodb_plugin/btr/btr0cur.c'
--- a/storage/innodb_plugin/btr/btr0cur.c	revid:bjorn.munch@oracle.com-20111019113657-2vj9rpd7gw9unyoj
+++ b/storage/innodb_plugin/btr/btr0cur.c	revid:marko.makela@stripped20111021033216-mj7hs42ezhvauac6
@@ -3261,7 +3261,6 @@ static
 void
 btr_record_not_null_field_in_rec(
 /*=============================*/
-	rec_t*		rec,		/*!< in: physical record */
 	ulint		n_unique,	/*!< in: dict_index_get_n_unique(index),
 					number of columns uniquely determine
 					an index entry */
@@ -3280,17 +3279,11 @@ btr_record_not_null_field_in_rec(
 	}
 
 	for (i = 0; i < n_unique; i++) {
-		ulint	rec_len;
-		byte*	field;
-
-		field = rec_get_nth_field(rec, offsets, i, &rec_len);
-
-		if (rec_len != UNIV_SQL_NULL) {
-			n_not_null[i]++;
-		} else {
-			/* Break if we hit the first NULL value */
+		if (rec_offs_nth_sql_null(offsets, i)) {
 			break;
 		}
+
+		n_not_null[i]++;
 	}
 }
 
@@ -3398,7 +3391,7 @@ btr_estimate_number_of_different_key_val
 
 			if (n_not_null) {
 				btr_record_not_null_field_in_rec(
-					rec, n_cols, offsets_rec, n_not_null);
+					n_cols, offsets_rec, n_not_null);
 			}
 		}
 
@@ -3433,8 +3426,7 @@ btr_estimate_number_of_different_key_val
 
 			if (n_not_null) {
 				btr_record_not_null_field_in_rec(
-					next_rec, n_cols, offsets_next_rec,
-					n_not_null);
+					n_cols, offsets_next_rec, n_not_null);
 			}
 
 			total_external_size

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1 branch (marko.makela:3628 to 3629) Bug#13116045marko.makela21 Oct