summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-11-17 13:48:39 +0200
committerunknown <heikki@donna.mysql.fi>2001-11-17 13:48:39 +0200
commit77c3dd15bf1d5f4cc90a5863341a06b31fba74f9 (patch)
tree787da1602ab19957328ec16ef6c00f2594a8fc67 /innobase/dict
parentfb9d56cdede7e8737fc2058878a8aed6897c8d75 (diff)
downloadmariadb-git-77c3dd15bf1d5f4cc90a5863341a06b31fba74f9.tar.gz
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
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0dict.c13
1 files changed, 11 insertions, 2 deletions
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);
}