diff options
Diffstat (limited to 'storage/tokudb/ft-index/ft/tests/verify-dup-in-leaf.cc')
-rw-r--r-- | storage/tokudb/ft-index/ft/tests/verify-dup-in-leaf.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/storage/tokudb/ft-index/ft/tests/verify-dup-in-leaf.cc b/storage/tokudb/ft-index/ft/tests/verify-dup-in-leaf.cc index 0f9f2a1000d..ee0256b4882 100644 --- a/storage/tokudb/ft-index/ft/tests/verify-dup-in-leaf.cc +++ b/storage/tokudb/ft-index/ft/tests/verify-dup-in-leaf.cc @@ -89,17 +89,17 @@ PATENT RIGHTS GRANT: #ident "Copyright (c) 2011-2013 Tokutek Inc. All rights reserved." // generate a tree with a single leaf node containing duplicate keys -// check that brt verify finds them +// check that ft verify finds them #include <ft-cachetable-wrappers.h> #include "test.h" static FTNODE -make_node(FT_HANDLE brt, int height) { +make_node(FT_HANDLE ft, int height) { FTNODE node = NULL; int n_children = (height == 0) ? 1 : 0; - toku_create_new_ftnode(brt, &node, height, n_children); + toku_create_new_ftnode(ft, &node, height, n_children); if (n_children) BP_STATE(node,0) = PT_AVAIL; return node; } @@ -112,13 +112,13 @@ append_leaf(FTNODE leafnode, void *key, size_t keylen, void *val, size_t vallen) DBT theval; toku_fill_dbt(&theval, val, vallen); // get an index that we can use to create a new leaf entry - uint32_t idx = BLB_DATA(leafnode, 0)->omt_size(); + uint32_t idx = BLB_DATA(leafnode, 0)->num_klpairs(); // apply an insert to the leaf node MSN msn = next_dummymsn(); - FT_MSG_S cmd = { FT_INSERT, msn, xids_get_root_xids(), .u={.id = { &thekey, &theval }} }; + FT_MSG_S msg = { FT_INSERT, msn, xids_get_root_xids(), .u={.id = { &thekey, &theval }} }; txn_gc_info gc_info(nullptr, TXNID_NONE, TXNID_NONE, false); - toku_ft_bn_apply_cmd_once(BLB(leafnode, 0), &cmd, idx, NULL, &gc_info, NULL, NULL); + toku_ft_bn_apply_msg_once(BLB(leafnode, 0), &msg, idx, NULL, &gc_info, NULL, NULL); // dont forget to dirty the node leafnode->dirty = 1; @@ -142,31 +142,31 @@ test_dup_in_leaf(int do_verify) { CACHETABLE ct = NULL; toku_cachetable_create(&ct, 0, ZERO_LSN, NULL_LOGGER); - // create the brt + // create the ft TOKUTXN null_txn = NULL; - FT_HANDLE brt = NULL; - r = toku_open_ft_handle(fname, 1, &brt, 1024, 256, TOKU_DEFAULT_COMPRESSION_METHOD, ct, null_txn, toku_builtin_compare_fun); + FT_HANDLE ft = NULL; + r = toku_open_ft_handle(fname, 1, &ft, 1024, 256, TOKU_DEFAULT_COMPRESSION_METHOD, ct, null_txn, toku_builtin_compare_fun); assert(r == 0); // discard the old root block - FTNODE newroot = make_node(brt, 0); + FTNODE newroot = make_node(ft, 0); populate_leaf(newroot, htonl(2), 1); populate_leaf(newroot, htonl(2), 2); // set the new root to point to the new tree - toku_ft_set_new_root_blocknum(brt->ft, newroot->thisnodename); + toku_ft_set_new_root_blocknum(ft->ft, newroot->thisnodename); // unpin the new root - toku_unpin_ftnode(brt->ft, newroot); + toku_unpin_ftnode(ft->ft, newroot); if (do_verify) { - r = toku_verify_ft(brt); + r = toku_verify_ft(ft); assert(r != 0); } // flush to the file system - r = toku_close_ft_handle_nolsn(brt, 0); + r = toku_close_ft_handle_nolsn(ft, 0); assert(r == 0); // shutdown the cachetable |