Commit 44c89c28 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Get a trace with an index and an insert, and try to get it to run

git-svn-id: file:///svn/tokudb@17 c7de825b-a66e-492c-adef-691d508d4ae1
parent fe5b1759
...@@ -35,11 +35,12 @@ C_OBJS= mut_pthread.lo \ ...@@ -35,11 +35,12 @@ C_OBJS= mut_pthread.lo \
txn.lo txn_auto.lo txn_method.lo txn_rec.lo txn_recover.lo \ txn.lo txn_auto.lo txn_method.lo txn_rec.lo txn_recover.lo \
txn_region.lo txn_stat.lo txn_util.lo xa.lo xa_db.lo xa_map.lo txn_region.lo txn_stat.lo txn_util.lo xa.lo xa_db.lo xa_map.lo
install: libdb.so MAYBENOTICECALL = noticecall.lo
cp libdb.so ../src/ #install: libdb.so
libdb.so: ydb.lo bdbw.lo noticecall.lo # cp libdb.so ../src/
libdb.so: ydb.lo bdbw.lo $(MAYBENOTICECALL)
echo cc ydb.lo bdbw.lo BDB-OBJS -shared -fPIC -o libdb.so $(CFLAGS) echo cc ydb.lo bdbw.lo BDB-OBJS -shared -fPIC -o libdb.so $(CFLAGS)
@cc ydb.lo bdbw.lo noticecall.lo $(patsubst %,/home/bradley/mysql/build-bdb-with-uniquename/bdb/build_unix/%,$(C_OBJS)) -shared -fPIC -o libdb.so $(CFLAGS) @cc ydb.lo bdbw.lo $(MAYBENOTICECALL) $(patsubst %,/home/bradley/mysql/build-bdb-with-uniquename/bdb/build_unix/%,$(C_OBJS)) -shared -fPIC -o libdb.so $(CFLAGS)
ydb.lo: bdbw.h ydb.lo: bdbw.h
bdbw.lo: CPPFLAGS=-I/home/bradley/mysql/build-bdb-with-uniquename/bdb/build_unix bdbw.lo: CPPFLAGS=-I/home/bradley/mysql/build-bdb-with-uniquename/bdb/build_unix
%.lo: %.c %.lo: %.c
......
...@@ -220,6 +220,8 @@ void ydb_env_set_noticecall (DB_ENV_ydb *env, void (*noticecall)(DB_ENV_ydb *, d ...@@ -220,6 +220,8 @@ void ydb_env_set_noticecall (DB_ENV_ydb *env, void (*noticecall)(DB_ENV_ydb *, d
fun_name = "berkeley_noticecall"; fun_name = "berkeley_noticecall";
} else { } else {
fun_name = "Unknown_function"; fun_name = "Unknown_function";
barf();
abort();
} }
tracef("envobj(%lld)->set_noticecall(envobj(%lld), %s);\n", tracef("envobj(%lld)->set_noticecall(envobj(%lld), %s);\n",
env->i->objnum, env->i->objnum, fun_name); env->i->objnum, env->i->objnum, fun_name);
...@@ -580,6 +582,7 @@ int bdbw_db_rename (DB_ydb *db, const char *namea, const char *database, const ...@@ -580,6 +582,7 @@ int bdbw_db_rename (DB_ydb *db, const char *namea, const char *database, const
} }
extern int berkeley_cmp_hidden_key(DB_ydb *, const DBT_ydb *, const DBT_ydb *); extern int berkeley_cmp_hidden_key(DB_ydb *, const DBT_ydb *, const DBT_ydb *);
extern int berkeley_cmp_packed_key(DB_ydb *, const DBT_ydb *, const DBT_ydb *);
static int bdbw_db_set_bt_compare (DB_ydb *db, int (*bt_compare)(DB_ydb *, const DBT_ydb *, const DBT_ydb *)) { static int bdbw_db_set_bt_compare (DB_ydb *db, int (*bt_compare)(DB_ydb *, const DBT_ydb *, const DBT_ydb *)) {
int r; int r;
...@@ -589,8 +592,12 @@ static int bdbw_db_set_bt_compare (DB_ydb *db, int (*bt_compare)(DB_ydb *, cons ...@@ -589,8 +592,12 @@ static int bdbw_db_set_bt_compare (DB_ydb *db, int (*bt_compare)(DB_ydb *, cons
const char *fun_name; const char *fun_name;
if (bt_compare==berkeley_cmp_hidden_key) { if (bt_compare==berkeley_cmp_hidden_key) {
fun_name = "berkeley_cmp_hidden_key"; fun_name = "berkeley_cmp_hidden_key";
} else if (bt_compare==berkeley_cmp_packed_key) {
fun_name = "berkeley_cmp_hidden_key";
} else { } else {
fun_name = "Unknown_function"; fun_name = "Unknown_function";
barf();
abort();
} }
tracef("r = dbobj(%lld)->set_bt_compare(dbobj(%lld), %s); assert(r==%d);\n", tracef("r = dbobj(%lld)->set_bt_compare(dbobj(%lld), %s); assert(r==%d);\n",
db->i->objnum, db->i->objnum, fun_name, r); db->i->objnum, db->i->objnum, fun_name, r);
......
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