Browse Source

Addresses #1121

Fixes bugs (memory leak) found in delboth test.
Also, DB_DELETE_ANY only ignores 'DB_NOTFOUND' error.  Any other error will be reported.

git-svn-id: file:///svn/tokudb@5887 c7de825b-a66e-492c-adef-691d508d4ae1
pull/56/head
Yoni Fogel 18 years ago
parent
commit
1c9f94df3a
  1. 5
      src/ydb.c

5
src/ydb.c

@ -2604,12 +2604,9 @@ static int toku_db_delboth_noassociate(DB *db, DB_TXN *txn, DBT *key, DBT *val,
if ((r = toku_db_cursor(db, txn, &dbc, 0, 0))) goto cursor_cleanup;
r = toku_c_get_noassociate(dbc, key, val, DB_GET_BOTH);
if (r!=0) {
if (suppress_missing) {
r = 0;
if (suppress_missing && r==DB_NOTFOUND) r = 0;
goto cursor_cleanup;
}
return r;
}
r = toku_c_del_noassociate(dbc, lock_flags);
cursor_cleanup:;
int r2 = toku_c_close(dbc);

Loading…
Cancel
Save