/* -*- mode: C; c-basic-offset: 4 -*- */ #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[]= __FILE__ ".brt"; const int nodesize = 4*1024*1024; TOKUTXN const null_txn = 0; DB * const null_db = 0; int error; CACHETABLE ct; BRT brt; int i; unlink(fname); error = toku_brt_create_cachetable(&ct, 0, ZERO_LSN, NULL_LOGGER); assert(error == 0); error = toku_open_brt(fname, TRUE, &brt, nodesize, ct, null_txn, toku_builtin_compare_fun, null_db); assert(error == 0); // insert keys 0, 1, 2, .. (n-1) for (i=0; i