-BtLatchSet *rset, *pset, *rpset;
-BtPool *rpool, *ppool, *rppool;
-BtPage rpage, ppage, rppage;
-uid right, parent, rparent;
-BtKey ptr;
-uint idx;
-
- // cache node's parent page
-
- parent = bt->page_no;
- ppage = bt->page;
- ppool = bt->pool;
- pset = bt->set;
-
- // lock and map our right page
- // it cannot be NULL because of the stopper
- // in the last right page
-
- bt_lockpage (BtLockWrite, set);
-
- // if we aren't dead yet
-
- if( page->act )
- goto rmergexit;
-
- if( right = bt_getid (page->right) )
- if( rpool = bt_pinpool (bt, right) )
- rpage = bt_page (bt, rpool, right);
- else
- return bt->err;
- else
- return bt->err = BTERR_struct;
-
- rset = bt_pinlatch (bt, right);
-
- // find our right neighbor
-
- if( ppage->act > 1 ) {
- for( idx = slot; idx++ < ppage->cnt; )
- if( !slotptr(ppage, idx)->dead )
- break;
-
- if( idx > ppage->cnt )
- return bt->err = BTERR_struct;