Browse Source
refs #6058, merge to main!
refs #6058, merge to main!
git-svn-id: file:///svn/toku/tokudb@54234 c7de825b-a66e-492c-adef-691d508d4ae1pull/73/head
committed by
Yoni Fogel
44 changed files with 1663 additions and 977 deletions
-
1buildheader/make_tdb.cc
-
5ft/ft-ops.cc
-
1ft/fttypes.h
-
1ft/log-internal.h
-
2ft/logformat.cc
-
11ft/recover.cc
-
2ft/tests/cachetable-rwlock-test.cc
-
12ft/tests/is_empty.cc
-
10ft/tests/le-cursor-provdel.cc
-
4ft/tests/le-cursor-right.cc
-
4ft/tests/le-cursor-walk.cc
-
21ft/tests/test-txn-child-manager.cc
-
12ft/tests/xid_lsn_independent.cc
-
103ft/txn.cc
-
10ft/txn.h
-
111ft/txn_manager.cc
-
3ft/txn_manager.h
-
36ft/xids.cc
-
2ft/xids.h
-
1src/indexer.cc
-
1src/loader.cc
-
1701src/tests/CMakeLists.txt
-
2src/tests/perf_child_txn.cc
-
1src/tests/perf_iibench.cc
-
1src/tests/perf_ptquery.cc
-
1src/tests/perf_ptquery2.cc
-
1src/tests/perf_rangequery.cc
-
50src/tests/perf_read_txn.cc
-
76src/tests/perf_read_txn_single_thread.cc
-
2src/tests/perf_txn_single_thread.cc
-
92src/tests/test_cursor_with_read_txn.cc
-
57src/tests/test_locking_with_read_txn.cc
-
163src/tests/test_read_txn_invalid_ops.cc
-
64src/tests/test_simple_read_txn.cc
-
2src/tests/test_stress1.cc
-
2src/tests/test_stress2.cc
-
2src/tests/test_stress3.cc
-
1src/tests/test_stress5.cc
-
10src/tests/threaded_stress_test_helpers.h
-
10src/ydb-internal.h
-
4src/ydb.cc
-
5src/ydb_db.cc
-
33src/ydb_txn.cc
-
7src/ydb_write.cc
1701
src/tests/CMakeLists.txt
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,50 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
|||
#ident "$Id: perf_nop.cc 45903 2012-07-19 13:06:39Z leifwalsh $"
|
|||
#include "test.h"
|
|||
|
|||
#include <stdio.h>
|
|||
#include <stdlib.h>
|
|||
|
|||
#include <toku_pthread.h>
|
|||
#include <unistd.h>
|
|||
#include <memory.h>
|
|||
#include <sys/stat.h>
|
|||
#include <db.h>
|
|||
|
|||
#include "threaded_stress_test_helpers.h"
|
|||
|
|||
// The intent of this test is to measure the throughput of creating and destroying
|
|||
// root read-only transactions that create snapshots
|
|||
|
|||
static int UU() nop(DB_TXN* UU(txn), ARG UU(arg), void* UU(operation_extra), void *UU(stats_extra)) { |
|||
return 0; |
|||
} |
|||
|
|||
|
|||
static void |
|||
stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { |
|||
if (verbose) printf("starting creation of pthreads\n"); |
|||
const int num_threads = cli_args->num_ptquery_threads; |
|||
struct arg myargs[num_threads]; |
|||
for (int i = 0; i < num_threads; i++) { |
|||
arg_init(&myargs[i], dbp, env, cli_args); |
|||
myargs[i].txn_flags |= DB_TXN_READ_ONLY; |
|||
myargs[i].operation = nop; |
|||
} |
|||
run_workers(myargs, num_threads, cli_args->num_seconds, false, cli_args); |
|||
} |
|||
|
|||
int |
|||
test_main(int argc, char *const argv[]) { |
|||
struct cli_args args = get_default_args_for_perf(); |
|||
parse_stress_test_args(argc, argv, &args); |
|||
args.single_txn = false; |
|||
args.num_elements = 0; |
|||
args.num_DBs = 0; |
|||
args.num_put_threads = 0; |
|||
args.num_update_threads = 0; |
|||
stress_test_main(&args); |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,76 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
|
|||
#ident "$Id: perf_txn_single_thread.cc 51911 2013-01-10 18:21:29Z zardosht $"
|
|||
#include "test.h"
|
|||
|
|||
#include <stdio.h>
|
|||
#include <stdlib.h>
|
|||
|
|||
#include <toku_pthread.h>
|
|||
#include <unistd.h>
|
|||
#include <memory.h>
|
|||
#include <sys/stat.h>
|
|||
#include <db.h>
|
|||
|
|||
#include "threaded_stress_test_helpers.h"
|
|||
|
|||
// The intent of this test is to measure how fast a single thread can
|
|||
// commit and create transactions when there exist N transactions.
|
|||
|
|||
DB_TXN** txns; |
|||
int num_txns; |
|||
|
|||
static int commit_and_create_txn( |
|||
DB_TXN* UU(txn), |
|||
ARG arg, |
|||
void* UU(operation_extra), |
|||
void* UU(stats_extra) |
|||
) |
|||
{ |
|||
int rand_txn_id = random() % num_txns; |
|||
int r = txns[rand_txn_id]->commit(txns[rand_txn_id], 0); |
|||
CKERR(r); |
|||
r = arg->env->txn_begin(arg->env, 0, &txns[rand_txn_id], arg->txn_flags | DB_TXN_READ_ONLY); |
|||
CKERR(r); |
|||
return 0; |
|||
} |
|||
|
|||
static void |
|||
stress_table(DB_ENV* env, DB** dbp, struct cli_args *cli_args) { |
|||
if (verbose) printf("starting running of stress\n"); |
|||
|
|||
num_txns = cli_args->txn_size; |
|||
XCALLOC_N(num_txns, txns); |
|||
for (int i = 0; i < num_txns; i++) { |
|||
int r = env->txn_begin(env, 0, &txns[i], DB_TXN_SNAPSHOT); |
|||
CKERR(r); |
|||
} |
|||
|
|||
struct arg myarg; |
|||
arg_init(&myarg, dbp, env, cli_args); |
|||
myarg.operation = commit_and_create_txn; |
|||
|
|||
run_workers(&myarg, 1, cli_args->num_seconds, false, cli_args); |
|||
|
|||
for (int i = 0; i < num_txns; i++) { |
|||
int chk_r = txns[i]->commit(txns[i], 0); |
|||
CKERR(chk_r); |
|||
} |
|||
toku_free(txns); |
|||
num_txns = 0; |
|||
} |
|||
|
|||
int |
|||
test_main(int argc, char *const argv[]) { |
|||
num_txns = 0; |
|||
txns = NULL; |
|||
struct cli_args args = get_default_args_for_perf(); |
|||
parse_stress_test_args(argc, argv, &args); |
|||
args.single_txn = true; |
|||
// this test is all about transactions, make the DB small
|
|||
args.num_elements = 1; |
|||
args.num_DBs= 1; |
|||
perf_test_main(&args); |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,92 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "$Id: test_get_max_row_size.cc 45903 2012-07-19 13:06:39Z leifwalsh $"
|
|||
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
|
|||
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
|
|||
#include "test.h"
|
|||
|
|||
int test_main(int argc, char * const argv[]) |
|||
{ |
|||
int r; |
|||
DB * db; |
|||
DB_ENV * env; |
|||
(void) argc; |
|||
(void) argv; |
|||
|
|||
toku_os_recursive_delete(TOKU_TEST_FILENAME); |
|||
r = toku_os_mkdir(TOKU_TEST_FILENAME, 0755); { int chk_r = r; CKERR(chk_r); } |
|||
|
|||
// set things up
|
|||
r = db_env_create(&env, 0); |
|||
CKERR(r); |
|||
r = env->open(env, TOKU_TEST_FILENAME, DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_PRIVATE, 0755); |
|||
CKERR(r); |
|||
r = db_create(&db, env, 0); |
|||
CKERR(r); |
|||
r = db->open(db, NULL, "foo.db", NULL, DB_BTREE, DB_CREATE, 0644); |
|||
CKERR(r); |
|||
|
|||
|
|||
DB_TXN* txn = NULL; |
|||
r = env->txn_begin(env, 0, &txn, DB_TXN_SNAPSHOT); |
|||
CKERR(r); |
|||
|
|||
int k = 1; |
|||
int v = 10; |
|||
DBT key, val; |
|||
r = db->put( |
|||
db, |
|||
txn, |
|||
dbt_init(&key, &k, sizeof k), |
|||
dbt_init(&val, &v, sizeof v), |
|||
0 |
|||
); |
|||
CKERR(r); |
|||
k = 2; |
|||
v = 20; |
|||
r = db->put( |
|||
db, |
|||
txn, |
|||
dbt_init(&key, &k, sizeof k), |
|||
dbt_init(&val, &v, sizeof v), |
|||
0 |
|||
); |
|||
CKERR(r); |
|||
r = txn->commit(txn, 0); |
|||
CKERR(r); |
|||
|
|||
r = env->txn_begin(env, 0, &txn, DB_TXN_SNAPSHOT | DB_TXN_READ_ONLY); |
|||
CKERR(r); |
|||
DBC* cursor = NULL; |
|||
r = db->cursor(db, txn, &cursor, 0); |
|||
CKERR(r); |
|||
DBT key1, val1; |
|||
memset(&key1, 0, sizeof key1); |
|||
memset(&val1, 0, sizeof val1); |
|||
r = cursor->c_get(cursor, &key1, &val1, DB_FIRST); |
|||
CKERR(r); |
|||
invariant(key1.size == sizeof(int)); |
|||
invariant(*(int *)key1.data == 1); |
|||
invariant(val1.size == sizeof(int)); |
|||
invariant(*(int *)val1.data == 10); |
|||
|
|||
r = cursor->c_get(cursor, &key1, &val1, DB_NEXT); |
|||
CKERR(r); |
|||
invariant(key1.size == sizeof(int)); |
|||
invariant(*(int *)key1.data == 2); |
|||
invariant(val1.size == sizeof(int)); |
|||
invariant(*(int *)val1.data == 20); |
|||
|
|||
r = cursor->c_close(cursor); |
|||
CKERR(r); |
|||
r = txn->commit(txn, 0); |
|||
CKERR(r); |
|||
|
|||
// clean things up
|
|||
r = db->close(db, 0); |
|||
CKERR(r); |
|||
r = env->close(env, 0); |
|||
CKERR(r); |
|||
|
|||
return 0; |
|||
} |
|||
@ -0,0 +1,57 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "$Id: test_get_max_row_size.cc 45903 2012-07-19 13:06:39Z leifwalsh $"
|
|||
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
|
|||
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
|
|||
#include "test.h"
|
|||
|
|||
int test_main(int argc, char * const argv[]) |
|||
{ |
|||
int r; |
|||
DB * db; |
|||
DB_ENV * env; |
|||
(void) argc; |
|||
(void) argv; |
|||
|
|||
const char *db_env_dir = TOKU_TEST_FILENAME; |
|||
char rm_cmd[strlen(db_env_dir) + strlen("rm -rf ") + 1]; |
|||
snprintf(rm_cmd, sizeof(rm_cmd), "rm -rf %s", db_env_dir); |
|||
|
|||
r = system(rm_cmd); { int chk_r = r; CKERR(chk_r); } |
|||
r = toku_os_mkdir(db_env_dir, 0755); { int chk_r = r; CKERR(chk_r); } |
|||
|
|||
// set things up
|
|||
r = db_env_create(&env, 0); |
|||
CKERR(r); |
|||
r = env->open(env, db_env_dir, DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_PRIVATE, 0755); |
|||
CKERR(r); |
|||
r = db_create(&db, env, 0); |
|||
CKERR(r); |
|||
r = db->open(db, NULL, "foo.db", NULL, DB_BTREE, DB_CREATE, 0644); |
|||
CKERR(r); |
|||
|
|||
|
|||
DB_TXN* txn1 = NULL; |
|||
DB_TXN* txn2 = NULL; |
|||
r = env->txn_begin(env, 0, &txn1, DB_TXN_READ_ONLY); |
|||
CKERR(r); |
|||
r = env->txn_begin(env, 0, &txn2, DB_TXN_READ_ONLY); |
|||
CKERR(r); |
|||
|
|||
|
|||
r=db->pre_acquire_table_lock(db, txn1); CKERR(r); |
|||
r=db->pre_acquire_table_lock(db, txn2); CKERR2(r, DB_LOCK_NOTGRANTED); |
|||
|
|||
r = txn1->commit(txn1, 0); |
|||
CKERR(r); |
|||
r = txn2->commit(txn2, 0); |
|||
CKERR(r); |
|||
|
|||
// clean things up
|
|||
r = db->close(db, 0); |
|||
CKERR(r); |
|||
r = env->close(env, 0); |
|||
CKERR(r); |
|||
|
|||
return 0; |
|||
} |
|||
@ -0,0 +1,163 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "$Id: test_get_max_row_size.cc 45903 2012-07-19 13:06:39Z leifwalsh $"
|
|||
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
|
|||
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
|
|||
#include "test.h"
|
|||
|
|||
|
|||
static int update_fun(DB *UU(db), |
|||
const DBT *UU(key), |
|||
const DBT *UU(old_val), const DBT *UU(extra), |
|||
void (*set_val)(const DBT *new_val, |
|||
void *set_extra), |
|||
void *UU(set_extra)) |
|||
{ |
|||
abort(); |
|||
assert(set_val != NULL); |
|||
return 0; |
|||
} |
|||
|
|||
static int generate_row_for_put( |
|||
DB *UU(dest_db), |
|||
DB *UU(src_db), |
|||
DBT *UU(dest_key), |
|||
DBT *UU(dest_val), |
|||
const DBT *UU(src_key), |
|||
const DBT *UU(src_val) |
|||
) |
|||
{ |
|||
abort(); |
|||
return 0; |
|||
} |
|||
|
|||
static int generate_row_for_del( |
|||
DB *UU(dest_db), |
|||
DB *UU(src_db), |
|||
DBT *UU(dest_key), |
|||
const DBT *UU(src_key), |
|||
const DBT *UU(src_val) |
|||
) |
|||
{ |
|||
abort(); |
|||
return 0; |
|||
} |
|||
|
|||
static void test_invalid_ops(uint32_t iso_flags) { |
|||
int r; |
|||
DB * db; |
|||
DB_ENV * env; |
|||
|
|||
toku_os_recursive_delete(TOKU_TEST_FILENAME); |
|||
r = toku_os_mkdir(TOKU_TEST_FILENAME, 0755); { int chk_r = r; CKERR(chk_r); } |
|||
|
|||
// set things up
|
|||
r = db_env_create(&env, 0); |
|||
CKERR(r); |
|||
r = env->set_generate_row_callback_for_put(env,generate_row_for_put); |
|||
CKERR(r); |
|||
r = env->set_generate_row_callback_for_del(env,generate_row_for_del); |
|||
CKERR(r); |
|||
env->set_update(env, update_fun); |
|||
r = env->open(env, TOKU_TEST_FILENAME, DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_PRIVATE, 0755); |
|||
CKERR(r); |
|||
r = db_create(&db, env, 0); |
|||
CKERR(r); |
|||
|
|||
DB_TXN* txn = NULL; |
|||
r = env->txn_begin(env, 0, &txn, iso_flags | DB_TXN_READ_ONLY); |
|||
CKERR(r); |
|||
|
|||
r = db->open(db, txn, "foo.db", NULL, DB_BTREE, DB_CREATE, 0644); |
|||
CKERR2(r, EINVAL); |
|||
r = db->open(db, NULL, "foo.db", NULL, DB_BTREE, DB_CREATE, 0644); |
|||
CKERR(r); |
|||
|
|||
int k = 1; |
|||
int v = 10; |
|||
DBT key, val; |
|||
dbt_init(&key, &k, sizeof k); |
|||
dbt_init(&val, &v, sizeof v); |
|||
|
|||
uint32_t db_flags = 0; |
|||
uint32_t indexer_flags = 0; |
|||
DB_INDEXER* indexer; |
|||
r = env->create_indexer( |
|||
env, |
|||
txn, |
|||
&indexer, |
|||
db, |
|||
1, |
|||
&db, |
|||
&db_flags, |
|||
indexer_flags |
|||
); |
|||
CKERR2(r, EINVAL); |
|||
|
|||
|
|||
// test invalid operations of ydb_db.cc,
|
|||
// db->open tested above
|
|||
DB_LOADER* loader; |
|||
uint32_t put_flags = 0; |
|||
uint32_t dbt_flags = 0; |
|||
r = env->create_loader(env, txn, &loader, NULL, 1, &db, &put_flags, &dbt_flags, 0); |
|||
CKERR2(r, EINVAL); |
|||
|
|||
r = db->change_descriptor(db, txn, &key, 0); |
|||
CKERR2(r, EINVAL); |
|||
|
|||
//
|
|||
// test invalid operations return EINVAL from ydb_write.cc
|
|||
//
|
|||
r = db->put(db, txn, &key, &val,0); |
|||
CKERR2(r, EINVAL); |
|||
r = db->del(db, txn, &key, DB_DELETE_ANY); |
|||
CKERR2(r, EINVAL); |
|||
r = db->update(db, txn, &key, &val, 0); |
|||
CKERR2(r, EINVAL); |
|||
r = db->update_broadcast(db, txn, &val, 0); |
|||
CKERR2(r, EINVAL); |
|||
|
|||
r = env->put_multiple(env, NULL, txn, &key, &val, 1, &db, &key, &val, 0); |
|||
CKERR2(r, EINVAL); |
|||
r = env->del_multiple(env, NULL, txn, &key, &val, 1, &db, &key, 0); |
|||
CKERR2(r, EINVAL); |
|||
uint32_t flags; |
|||
r = env->update_multiple( |
|||
env, NULL, txn, |
|||
&key, &val, |
|||
&key, &val, |
|||
1, &db, &flags, |
|||
1, &key, |
|||
1, &val |
|||
); |
|||
CKERR2(r, EINVAL); |
|||
|
|||
r = db->close(db, 0); |
|||
CKERR(r); |
|||
|
|||
// test invalid operations of ydb.cc, dbrename and dbremove
|
|||
r = env->dbremove(env, txn, "foo.db", NULL, 0); |
|||
CKERR2(r, EINVAL); |
|||
// test invalid operations of ydb.cc, dbrename and dbremove
|
|||
r = env->dbrename(env, txn, "foo.db", NULL, "bar.db", 0); |
|||
CKERR2(r, EINVAL); |
|||
|
|||
r = txn->commit(txn, 0); |
|||
CKERR(r); |
|||
|
|||
// clean things up
|
|||
r = env->close(env, 0); |
|||
CKERR(r); |
|||
} |
|||
|
|||
|
|||
int test_main(int argc, char * const argv[]) { |
|||
(void) argc; |
|||
(void) argv; |
|||
test_invalid_ops(0); |
|||
test_invalid_ops(DB_TXN_SNAPSHOT); |
|||
test_invalid_ops(DB_READ_COMMITTED); |
|||
test_invalid_ops(DB_READ_UNCOMMITTED); |
|||
return 0; |
|||
} |
|||
@ -0,0 +1,64 @@ |
|||
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ |
|||
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
|
|||
#ident "$Id: test_get_max_row_size.cc 45903 2012-07-19 13:06:39Z leifwalsh $"
|
|||
#ident "Copyright (c) 2007-2012 Tokutek Inc. All rights reserved."
|
|||
#ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it."
|
|||
#include "test.h"
|
|||
|
|||
|
|||
static void test_read_txn_creation(DB_ENV* env, uint32_t iso_flags) { |
|||
int r; |
|||
DB_TXN* parent_txn = NULL; |
|||
DB_TXN* child_txn = NULL; |
|||
r = env->txn_begin(env, 0, &parent_txn, iso_flags); |
|||
CKERR(r); |
|||
r = env->txn_begin(env, parent_txn, &child_txn, iso_flags | DB_TXN_READ_ONLY); |
|||
CKERR2(r, EINVAL); |
|||
r = env->txn_begin(env, parent_txn, &child_txn, iso_flags); |
|||
CKERR(r); |
|||
r = child_txn->commit(child_txn, 0); |
|||
CKERR(r); |
|||
r = parent_txn->commit(parent_txn, 0); |
|||
CKERR(r); |
|||
|
|||
r = env->txn_begin(env, 0, &parent_txn, iso_flags | DB_TXN_READ_ONLY); |
|||
CKERR(r); |
|||
r = env->txn_begin(env, parent_txn, &child_txn, iso_flags | DB_TXN_READ_ONLY); |
|||
CKERR(r); |
|||
r = child_txn->commit(child_txn, 0); |
|||
CKERR(r); |
|||
r = env->txn_begin(env, parent_txn, &child_txn, iso_flags); |
|||
CKERR(r); |
|||
r = child_txn->commit(child_txn, 0); |
|||
CKERR(r); |
|||
r = parent_txn->commit(parent_txn, 0); |
|||
CKERR(r); |
|||
|
|||
} |
|||
|
|||
int test_main(int argc, char * const argv[]) |
|||
{ |
|||
int r; |
|||
DB_ENV * env; |
|||
(void) argc; |
|||
(void) argv; |
|||
|
|||
toku_os_recursive_delete(TOKU_TEST_FILENAME); |
|||
r = toku_os_mkdir(TOKU_TEST_FILENAME, 0755); { int chk_r = r; CKERR(chk_r); } |
|||
|
|||
// set things up
|
|||
r = db_env_create(&env, 0); |
|||
CKERR(r); |
|||
r = env->open(env, TOKU_TEST_FILENAME, DB_INIT_MPOOL|DB_CREATE|DB_THREAD |DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_TXN|DB_PRIVATE, 0755); |
|||
CKERR(r); |
|||
|
|||
test_read_txn_creation(env, 0); |
|||
test_read_txn_creation(env, DB_TXN_SNAPSHOT); |
|||
test_read_txn_creation(env, DB_READ_COMMITTED); |
|||
test_read_txn_creation(env, DB_READ_UNCOMMITTED); |
|||
|
|||
r = env->close(env, 0); |
|||
CKERR(r); |
|||
|
|||
return 0; |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue