summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-11-18 14:33:53 +0200
committerunknown <monty@hundin.mysql.fi>2001-11-18 14:33:53 +0200
commit8ec827ac0af74ac1e3b8bbca10b2278c4d31da8f (patch)
tree1187f38a1c1328c1f13ef771f484af421ee2566b /innobase/dict
parent58a89609ad7a0540ed4d1818ddb93dcd41147a26 (diff)
parent3a12d775979f497a399fa972630066eebe756d4c (diff)
downloadmariadb-git-8ec827ac0af74ac1e3b8bbca10b2278c4d31da8f.tar.gz
Merge
Docs/manual.texi: Auto merged innobase/btr/btr0btr.c: Auto merged innobase/btr/btr0cur.c: Auto merged innobase/dict/dict0dict.c: Auto merged sql/ha_myisam.cc: Auto merged sql/mysqld.cc: Auto merged mysql-test/t/myisam.test: Auto merged
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 0079ff08057..4b503a3dc49 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -2415,7 +2415,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 */
+ ulint level) /* in: level of rec in tree: 0 means leaf
+ level */
{
dtuple_t* tuple;
dict_index_t* ind;
@@ -2427,9 +2429,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);
}