From ecb9be04d7a847b283d8281e06712a61b2ac3e7e Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Nov 2001 13:48:39 +0200 Subject: btr0cur.c, btr0btr.c, dict0dict.h, dict0dict.c: Fix a bug in insert buffer B-tree upper levels; probably caused the crash by B.Fitzpatrick buf0flu.c: Fix a bug in previous change A small optimization for LRU flushes to avoid losing hot pages from the buffer pool innobase/buf/buf0flu.c: Fix a bug in previous change innobase/dict/dict0dict.c: Fix a bug in insert buffer B-tree upper levels; probably caused the crash by B.Fitzpatrick innobase/include/dict0dict.h: Fix a bug in insert buffer B-tree upper levels; probably caused the crash by B.Fitzpatrick innobase/btr/btr0btr.c: Fix a bug in insert buffer B-tree upper levels; probably caused the crash by B.Fitzpatrick innobase/btr/btr0cur.c: Fix a bug in insert buffer B-tree upper levels; probably caused the crash by B.Fitzpatrick --- innobase/dict/dict0dict.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'innobase/dict') diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 07a9b472d66..e5ac2f3c577 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -2411,7 +2411,9 @@ dict_tree_build_node_ptr( dict_tree_t* tree, /* in: index tree */ rec_t* rec, /* in: record for which to build node pointer */ ulint page_no,/* in: page number to put in node pointer */ - mem_heap_t* heap) /* in: memory heap where pointer created */ + mem_heap_t* heap, /* in: memory heap where pointer created */ + ibool level) /* in: level of rec in tree: 0 means leaf + level */ { dtuple_t* tuple; dict_index_t* ind; @@ -2423,9 +2425,16 @@ dict_tree_build_node_ptr( if (tree->type & DICT_UNIVERSAL) { /* In a universal index tree, we take the whole record as - the node pointer */ + the node pointer if the reord is on the leaf level, + on non-leaf levels we remove the last field, which + contains the page number of the child page */ n_unique = rec_get_n_fields(rec); + + if (level > 0) { + ut_a(n_unique > 1); + n_unique--; + } } else { n_unique = dict_index_get_n_unique_in_tree(ind); } -- cgit v1.2.1 From 02945f655ed9f4ce6ff71f30e67ba1ee6da87c8d Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Nov 2001 14:18:27 +0200 Subject: dict0dict.h, dict0dict.c: Fix wrong (though equivalent) type decl innobase/dict/dict0dict.c: Fix wrong (though equivalent) type decl innobase/include/dict0dict.h: Fix wrong (though equivalent) type decl --- innobase/dict/dict0dict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'innobase/dict') diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index e5ac2f3c577..ba032013baf 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -2412,7 +2412,7 @@ dict_tree_build_node_ptr( rec_t* rec, /* in: record for which to build node pointer */ ulint page_no,/* in: page number to put in node pointer */ mem_heap_t* heap, /* in: memory heap where pointer created */ - ibool level) /* in: level of rec in tree: 0 means leaf + ulint level) /* in: level of rec in tree: 0 means leaf level */ { dtuple_t* tuple; -- cgit v1.2.1