From b26cf470d18f48492c0c191cdfadaf142c8c35f3 Mon Sep 17 00:00:00 2001 From: YuhangQ Date: Mon, 25 Oct 2021 23:15:15 +0800 Subject: [PATCH] btree insert finished! --- invodb/btree/btree_node.h | 4 ++-- invodb/btree/btree_uuid.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/invodb/btree/btree_node.h b/invodb/btree/btree_node.h index 5d9f397..171b3fb 100644 --- a/invodb/btree/btree_node.h +++ b/invodb/btree/btree_node.h @@ -103,8 +103,8 @@ public: page.save(); } static const int m = 28; - std::string key[m+100]; - int val[m+200]; + std::string key[m]; + int val[m+1]; int parent; private: static std::map map; diff --git a/invodb/btree/btree_uuid.h b/invodb/btree/btree_uuid.h index 4127a31..0b44d13 100644 --- a/invodb/btree/btree_uuid.h +++ b/invodb/btree/btree_uuid.h @@ -13,8 +13,8 @@ public: ~BTreeUUID() { delete root; }; void insert(const char* uuid, int address); void print(); - void innerPrint(BTreeNodeUUID* cur); private: + void innerPrint(BTreeNodeUUID* cur); void split(std::string uuid, int address, BTreeNodeUUID* parent, BTreeNodeUUID* cur); void insertInternal(std::string uuid, BTreeNodeUUID* cur, BTreeNodeUUID* lLeaf, BTreeNodeUUID* rLeaf); BTreeNodeUUID *root;