diff options
author | unknown <marko@hundin.mysql.fi> | 2004-12-08 15:20:58 +0200 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-12-08 15:20:58 +0200 |
commit | f9bd116c297f80613ed0e51750e20e5fcb623f75 (patch) | |
tree | 5272431593f811f100e49cab43250218383bbd06 /innobase/btr | |
parent | 746799fb23aaef1705e9ee66de6a2cb77a8af2c8 (diff) | |
download | mariadb-git-f9bd116c297f80613ed0e51750e20e5fcb623f75.tar.gz |
InnoDB: Make btr_search_drop_page_hash_index() work with the compact
record format without requiring the doubly linked list added by
Heikki in ChangeSet@1.1627.16.2
innobase/btr/btr0sea.c:
btr_search_drop_page_hash_index(): support the compact record format
innobase/ibuf/ibuf0ibuf.c:
ibuf_insert_to_index_page(): Remove unnecessary computation of
field offsets.
innobase/row/row0ins.c:
row_ins_index_entry_low(): Remove unnecessary computation of
field offsets.
Diffstat (limited to 'innobase/btr')
-rw-r--r-- | innobase/btr/btr0sea.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c index f2f5d09fa0e..c18fa9a923d 100644 --- a/innobase/btr/btr0sea.c +++ b/innobase/btr/btr0sea.c @@ -937,6 +937,8 @@ btr_search_drop_page_hash_index( ulint n_recs; ulint* folds; ulint i; + mem_heap_t* heap; + ulint* offsets; #ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)); @@ -984,10 +986,10 @@ btr_search_drop_page_hash_index( rec = page_rec_get_next(rec); if (rec != sup) { - ut_a(n_fields <= rec_get_n_fields(rec)); + ut_a(n_fields <= rec_get_n_fields(rec, block->index)); if (n_bytes > 0) { - ut_a(n_fields < rec_get_n_fields(rec)); + ut_a(n_fields < rec_get_n_fields(rec, block->index)); } } @@ -995,11 +997,15 @@ btr_search_drop_page_hash_index( prev_fold = 0; + heap = mem_heap_create(100); + offsets = NULL; + while (rec != sup) { /* FIXME: in a mixed tree, not all records may have enough ordering fields: */ - - fold = rec_fold(rec, n_fields, n_bytes, tree_id); + offsets = rec_reget_offsets(rec, block->index, + offsets, n_fields + (n_bytes > 0), heap); + fold = rec_fold(rec, offsets, n_fields, n_bytes, tree_id); if (fold == prev_fold && prev_fold != 0) { @@ -1016,6 +1022,8 @@ next_rec: prev_fold = fold; } + mem_heap_free(heap); + rw_lock_x_lock(&btr_search_latch); for (i = 0; i < n_cached; i++) { |