summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2011-10-21 06:54:49 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2011-10-21 06:54:49 +0300
commitf6064041d29781e1f665e79e2d79fd6e99476a5d (patch)
treeb299456b96d0f33fbe520d50c7ef0f51028d9a4f /storage
parentbf456a8772ee84e8f308ea3abf402dc5ee016216 (diff)
parent8a0be8a541a1fd79bce33fc5157e8c7ff613c185 (diff)
downloadmariadb-git-f6064041d29781e1f665e79e2d79fd6e99476a5d.tar.gz
Merge mysql-5.1 to mysql-5.5.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/btr/btr0cur.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
index 939b1cae636..625721133fd 100644
--- a/storage/innobase/btr/btr0cur.c
+++ b/storage/innobase/btr/btr0cur.c
@@ -3542,16 +3542,11 @@ btr_record_not_null_field_in_rec(
}
for (i = 0; i < n_unique; i++) {
- ulint rec_len;
-
- rec_get_nth_field_offs(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]++;
}
}
@@ -3694,8 +3689,7 @@ btr_estimate_number_of_different_key_vals(
if (n_not_null) {
btr_record_not_null_field_in_rec(
- n_cols, offsets_next_rec,
- n_not_null);
+ n_cols, offsets_next_rec, n_not_null);
}
total_external_size