uint cnt; // count of keys in page
uint act; // count of active keys
uint min; // next key offset
uint cnt; // count of keys in page
uint act; // count of active keys
uint min; // next key offset
unsigned char lvl:7; // level of page
unsigned char dirty:1; // page is dirty
unsigned char right[BtId]; // page number to right
unsigned char lvl:7; // level of page
unsigned char dirty:1; // page is dirty
unsigned char right[BtId]; // page number to right
int nodemax; // highest page cache segment allocated
int hashmask; // number of pages in segments - 1
int hashsize; // size of hash table
int nodemax; // highest page cache segment allocated
int hashmask; // number of pages in segments - 1
int hashsize; // size of hash table
int found; // last deletekey found key
int fence; // last load page used fence position
BtHash *lrufirst; // lru list head
int found; // last deletekey found key
int fence; // last load page used fence position
BtHash *lrufirst; // lru list head
// store chain in second right
bt_putid(bt->temp->right, bt_getid(bt->alloc[1].right));
bt_putid(bt->alloc[1].right, page_no);
// store chain in second right
bt_putid(bt->temp->right, bt_getid(bt->alloc[1].right));
bt_putid(bt->alloc[1].right, page_no);
uint diff, higher = bt->page->cnt, low = 1, slot;
uint good = 0;
uint diff, higher = bt->page->cnt, low = 1, slot;
uint good = 0;
do {
// determine lock mode of drill level
mode = (lock == BtLockWrite) && (drill == lvl) ? BtLockWrite : BtLockRead;
do {
// determine lock mode of drill level
mode = (lock == BtLockWrite) && (drill == lvl) ? BtLockWrite : BtLockRead;
- page_no = bt_getid(slotptr(bt->page, slot)->id);
- bt->fence = slot == bt->page->cnt;
- bt->posted = 1;
- drill--;
+ if( slot <= bt->page->cnt ) {
+ page_no = bt_getid(slotptr(bt->page, slot)->id);
+ bt->fence = slot == bt->page->cnt;
+ drill--;
+ continue;
+ }