mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Make all external symbols in brt-verify.o start with toku_. Addresses #8
git-svn-id: file:///svn/tokudb@679 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
529339d357
commit
b904eec0d7
4 changed files with 14 additions and 14 deletions
|
@ -252,11 +252,11 @@ static void test_multiple_files_of_size (int size) {
|
|||
snprintf(val, 100, "Val%d", i);
|
||||
brt_insert(t1, fill_dbt(&k, key, 1+strlen(key)), fill_dbt(&v, val, 1+strlen(val)), null_db, null_txn);
|
||||
}
|
||||
//verify_brt(t0);
|
||||
//toku_verify_brt(t0);
|
||||
//dump_brt(t0);
|
||||
//dump_brt(t1);
|
||||
verify_brt(t0);
|
||||
verify_brt(t1);
|
||||
toku_verify_brt(t0);
|
||||
toku_verify_brt(t1);
|
||||
|
||||
r = close_brt(t0); assert(r==0);
|
||||
r = close_brt(t1); assert(r==0);
|
||||
|
@ -508,7 +508,7 @@ static void test_read_what_was_written (void) {
|
|||
assert(strcmp(v.data,"there")==0);
|
||||
}
|
||||
|
||||
assert(verify_brt(brt)==0);
|
||||
assert(toku_verify_brt(brt)==0);
|
||||
|
||||
/* Now put a bunch (NVALS) of things in. */
|
||||
{
|
||||
|
@ -519,12 +519,12 @@ static void test_read_what_was_written (void) {
|
|||
snprintf(key, 100, "key%d", i);
|
||||
snprintf(val, 100, "val%d", i);
|
||||
if (i<600) {
|
||||
int verify_result=verify_brt(brt);;
|
||||
int verify_result=toku_verify_brt(brt);;
|
||||
assert(verify_result==0);
|
||||
}
|
||||
brt_insert(brt, fill_dbt(&k, key, strlen(key)+1), fill_dbt(&v, val, strlen(val)+1), null_db, null_txn);
|
||||
if (i<600) {
|
||||
int verify_result=verify_brt(brt);
|
||||
int verify_result=toku_verify_brt(brt);
|
||||
if (verify_result) {
|
||||
dump_brt(brt);
|
||||
assert(0);
|
||||
|
@ -549,7 +549,7 @@ static void test_read_what_was_written (void) {
|
|||
printf("Now read them out\n");
|
||||
|
||||
//show_brt_blocknumbers(brt);
|
||||
verify_brt(brt);
|
||||
toku_verify_brt(brt);
|
||||
//dump_brt(brt);
|
||||
|
||||
/* See if we can read them all out again. */
|
||||
|
|
|
@ -53,7 +53,7 @@ static void verify_parent_fingerprint (BRTNODE node) {
|
|||
}
|
||||
}
|
||||
|
||||
int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode) {
|
||||
int toku_verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode) {
|
||||
int result=0;
|
||||
BRTNODE node;
|
||||
void *node_v;
|
||||
|
@ -106,7 +106,7 @@ int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, byteve
|
|||
if (hirange) assert(toku_keycompare(node->u.n.childkeys[i-1], node->u.n.childkeylens[i-1], hirange, hilen)<=0);
|
||||
}
|
||||
if (recurse) {
|
||||
result|=verify_brtnode(brt, node->u.n.children[i],
|
||||
result|=toku_verify_brtnode(brt, node->u.n.children[i],
|
||||
(i==0) ? lorange : node->u.n.childkeys[i-1],
|
||||
(i==0) ? lolen : node->u.n.childkeylens[i-1],
|
||||
(i==node->u.n.n_children-1) ? hirange : node->u.n.childkeys[i],
|
||||
|
@ -120,7 +120,7 @@ int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, byteve
|
|||
return result;
|
||||
}
|
||||
|
||||
int verify_brt (BRT brt) {
|
||||
int toku_verify_brt (BRT brt) {
|
||||
int r;
|
||||
CACHEKEY *rootp;
|
||||
if ((r = toku_read_and_pin_brt_header(brt->cf, &brt->h))) {
|
||||
|
@ -128,7 +128,7 @@ int verify_brt (BRT brt) {
|
|||
return r;
|
||||
}
|
||||
rootp = toku_calculate_root_offset_pointer(brt);
|
||||
if ((r=verify_brtnode(brt, *rootp, 0, 0, 0, 0, 1, null_brtnode))) goto died0;
|
||||
if ((r=toku_verify_brtnode(brt, *rootp, 0, 0, 0, 0, 1, null_brtnode))) goto died0;
|
||||
if ((r = toku_unpin_brt_header(brt))!=0) return r;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1941,7 +1941,7 @@ int brt_delete(BRT brt, DBT *key, DB *db) {
|
|||
return r;
|
||||
}
|
||||
|
||||
int verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode);
|
||||
int toku_verify_brtnode (BRT brt, DISKOFF off, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, int recurse, BRTNODE parent_brtnode);
|
||||
|
||||
int dump_brtnode (BRT brt, DISKOFF off, int depth, bytevec lorange, ITEMLEN lolen, bytevec hirange, ITEMLEN hilen, BRTNODE parent_brtnode) {
|
||||
int result=0;
|
||||
|
@ -1953,7 +1953,7 @@ int dump_brtnode (BRT brt, DISKOFF off, int depth, bytevec lorange, ITEMLEN lole
|
|||
printf("%s:%d pin %p\n", __FILE__, __LINE__, node_v);
|
||||
node=node_v;
|
||||
node->parent_brtnode = parent_brtnode;
|
||||
result=verify_brtnode(brt, off, lorange, lolen, hirange, hilen, 0, parent_brtnode);
|
||||
result=toku_verify_brtnode(brt, off, lorange, lolen, hirange, hilen, 0, parent_brtnode);
|
||||
printf("%*sNode=%p\n", depth, "", node);
|
||||
if (node->height>0) {
|
||||
printf("%*sNode %lld nodesize=%d height=%d n_children=%d n_bytes_in_hashtables=%d keyrange=%s %s\n",
|
||||
|
|
|
@ -43,7 +43,7 @@ void brt_flush (BRT); /* fsync and clear the caches. */
|
|||
int brt_create_cachetable(CACHETABLE *t, long cachesize, LSN initial_lsn, TOKULOGGER);
|
||||
|
||||
extern int brt_debug_mode;
|
||||
int verify_brt (BRT brt);
|
||||
int toku_verify_brt (BRT brt);
|
||||
|
||||
int show_brt_blocknumbers(BRT);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue