/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #include "includes.h" #include "test.h" // create a brt and put n rows into it // write the brt to the file // verify the rows in the brt static void test_sub_block(int n) { if (verbose) printf("%s:%d %d\n", __FUNCTION__, __LINE__, n); const char fname[]= __SRCFILE__ ".ft_handle"; const int nodesize = 4*1024*1024; const int basementnodesize = 128*1024; const enum toku_compression_method compression_method = TOKU_DEFAULT_COMPRESSION_METHOD; TOKUTXN const null_txn = 0; int error; CACHETABLE ct; FT_HANDLE brt; int i; unlink(fname); toku_cachetable_create(&ct, 0, ZERO_LSN, NULL_LOGGER); error = toku_open_ft_handle(fname, true, &brt, nodesize, basementnodesize, compression_method, ct, null_txn, toku_builtin_compare_fun); assert(error == 0); // insert keys 0, 1, 2, .. (n-1) for (i=0; i