mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
8511ea7372
Also the file numbers can thus be reused. Don't pass the BRT into the flush commands, since the BRT may no longer be present. Put a counter in to see how many rollback records are present. (Addresses #698.) Increment the file version to 4. Fixes #545, #703. Note: All the tests pass except * Many cxx tests are getting valgrind errors. (Addresses #716. Possibly causes #716.) * {{{test_log9.recover}}} fails with "Binary files ... differ". These will presumably be fixed by #711 or #714. (Addresses #711, #714.) * {{{test_log10.recover}}} fails. There are two failures: 1. A valgrind problem (see #718.) (Addresses #718. Possibly causes #718.) 1. The "Binary files ... differ" issue. git-svn-id: file:///svn/tokudb@3486 c7de825b-a66e-492c-adef-691d508d4ae1
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/* -*- mode: C; c-basic-offset: 4 -*- */
|
|
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
|
|
|
|
#include "brt.h"
|
|
#include "key.h"
|
|
#include "test.h"
|
|
#include "toku_assert.h"
|
|
#include <unistd.h>
|
|
|
|
static TOKUTXN const null_txn = 0;
|
|
static DB * const null_db = 0;
|
|
|
|
static void test0 (void) {
|
|
BRT t;
|
|
int r;
|
|
CACHETABLE ct;
|
|
char fname[]="brt-test0.brt";
|
|
if (verbose) printf("%s:%d test0\n", __FILE__, __LINE__);
|
|
toku_memory_check=1;
|
|
toku_memory_check_all_free();
|
|
r = toku_brt_create_cachetable(&ct, 0, ZERO_LSN, NULL_LOGGER);
|
|
assert(r==0);
|
|
if (verbose) printf("%s:%d test0\n", __FILE__, __LINE__);
|
|
unlink(fname);
|
|
r = toku_open_brt(fname, 0, 1, &t, 1024, ct, null_txn, toku_default_compare_fun, null_db);
|
|
assert(r==0);
|
|
//printf("%s:%d test0\n", __FILE__, __LINE__);
|
|
//printf("%s:%d n_items_malloced=%lld\n", __FILE__, __LINE__, n_items_malloced);
|
|
r = toku_close_brt(t, 0); assert(r==0);
|
|
//printf("%s:%d n_items_malloced=%lld\n", __FILE__, __LINE__, n_items_malloced);
|
|
r = toku_cachetable_close(&ct);
|
|
assert(r==0);
|
|
toku_memory_check_all_free();
|
|
}
|
|
|
|
int main (int argc , const char *argv[]) {
|
|
default_parse_args(argc, argv);
|
|
if (verbose) printf("test0 A\n");
|
|
test0();
|
|
if (verbose) printf("test0 B\n");
|
|
test0(); /* Make sure it works twice. */
|
|
toku_malloc_cleanup();
|
|
if (verbose) printf("test0 ok\n");
|
|
return 0;
|
|
}
|