Commit 1c9f94df authored by Yoni Fogel's avatar Yoni Fogel

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
parent 63d73bde
...@@ -2604,12 +2604,9 @@ static int toku_db_delboth_noassociate(DB *db, DB_TXN *txn, DBT *key, DBT *val, ...@@ -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; if ((r = toku_db_cursor(db, txn, &dbc, 0, 0))) goto cursor_cleanup;
r = toku_c_get_noassociate(dbc, key, val, DB_GET_BOTH); r = toku_c_get_noassociate(dbc, key, val, DB_GET_BOTH);
if (r!=0) { if (r!=0) {
if (suppress_missing) { if (suppress_missing && r==DB_NOTFOUND) r = 0;
r = 0;
goto cursor_cleanup; goto cursor_cleanup;
} }
return r;
}
r = toku_c_del_noassociate(dbc, lock_flags); r = toku_c_del_noassociate(dbc, lock_flags);
cursor_cleanup:; cursor_cleanup:;
int r2 = toku_c_close(dbc); int r2 = toku_c_close(dbc);
......
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