pma: btree test related changes

This commit is contained in:
barter-simsum 2024-03-13 15:20:33 -04:00
parent c97a90f77d
commit b6cf968083
2 changed files with 9 additions and 1 deletions

View File

@ -10,4 +10,9 @@
#undef BT_DAT_MAXKEYS #undef BT_DAT_MAXKEYS
#define BT_DAT_MAXKEYS 10 #define BT_DAT_MAXKEYS 10
/* maxdepth expanded because when BT_DAT_MAXKEYS is shrunk, the depth of the
btree can grow higher than usual */
#undef BT_MAXDEPTH
#define BT_MAXDEPTH 10
#endif #endif

View File

@ -367,7 +367,10 @@ _bt_insertdat(vaof_t lo, vaof_t hi, pgno_t fo,
static int _bt_flip_meta(BT_state *); static int _bt_flip_meta(BT_state *);
#define BT_MAXDEPTH 4 /* ;;: todo derive it */ /* TODO: derive BT_MAXDEPTH */
#ifndef BT_MAXDEPTH
#define BT_MAXDEPTH 4
#endif
typedef struct BT_findpath BT_findpath; typedef struct BT_findpath BT_findpath;
struct BT_findpath { struct BT_findpath {
BT_page *path[BT_MAXDEPTH]; BT_page *path[BT_MAXDEPTH];