Commit d89f2773 authored by Yoni Fogel's avatar Yoni Fogel

toku_db_put_noassociate will call

get_noassociate instead of get (in case we ever call this on a secondary db).
Addresses #180

git-svn-id: file:///svn/tokudb@1154 c7de825b-a66e-492c-adef-691d508d4ae1
parent d9842830
......@@ -1292,7 +1292,7 @@ static int toku_db_put_noassociate(DB * db, DB_TXN * txn, DBT * key, DBT * data,
} else if (flags == DB_NOOVERWRITE) {
/* check if the key already exists */
DBT testfordata;
r = db->get(db, txn, key, toku_init_dbt(&testfordata), 0);
r = toku_db_get_noassociate(db, txn, key, toku_init_dbt(&testfordata), 0);
if (r == 0)
return DB_KEYEXIST;
} else if (flags != 0) {
......@@ -1300,7 +1300,7 @@ static int toku_db_put_noassociate(DB * db, DB_TXN * txn, DBT * key, DBT * data,
return EINVAL;
} else {
if (brtflags & TOKU_DB_DUPSORT) {
r = db->get(db, txn, key, data, DB_GET_BOTH);
r = toku_db_get_noassociate(db, txn, key, data, DB_GET_BOTH);
if (r == 0)
return DB_KEYEXIST;
}
......
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