diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2011-10-21 06:32:16 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2011-10-21 06:32:16 +0300 |
commit | 8a0be8a541a1fd79bce33fc5157e8c7ff613c185 (patch) | |
tree | 2224c18334c70d5c082b7ecece99010bc006efb3 /storage/innobase | |
parent | 14dff92d58569657c126bc8cc8755d0341581ea4 (diff) | |
download | mariadb-git-8a0be8a541a1fd79bce33fc5157e8c7ff613c185.tar.gz |
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
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/btr/btr0cur.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index a1dda8edf69..37bb3188785 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -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_vals( 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_vals( 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 |