Commit 3b26eb0b authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

test_log3 now tries inserting something. The resulting log entry is bad, however. Addresses #27.

git-svn-id: file:///svn/tokudb@744 c7de825b-a66e-492c-adef-691d508d4ae1
parent 5a23e289
......@@ -6,6 +6,7 @@
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
// DIR is defined in the Makefile
......@@ -25,6 +26,16 @@ static void make_db (void) {
r=env->txn_begin(env, 0, &tid, 0); assert(r==0);
r=db->open(db, tid, "foo.db", 0, DB_BTREE, DB_CREATE, 0777); CKERR(r);
r=tid->commit(tid, 0); assert(r==0);
r=env->txn_begin(env, 0, &tid, 0); assert(r==0);
{
DBT key,data;
memset(&key, 0, sizeof(key));
memset(&data, 0, sizeof(data));
key.data = "hello"; key.size=6;
data.data = "there"; data.size=6;
r=db->put(db, tid, &key, &data, 0); assert(r==0);
}
r=tid->commit(tid, 0); assert(r==0);
r=db->close(db, 0); assert(r==0);
r=env->close(env, 0); assert(r==0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment