Commit 14857271 authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

refs #5282 i lied, the ydb layer needed some fixes for txnless descriptor updates :)


git-svn-id: file:///svn/toku/tokudb@45959 c7de825b-a66e-492c-adef-691d508d4ae1
parent b38be380
...@@ -483,11 +483,11 @@ toku_db_change_descriptor(DB *db, DB_TXN* txn, const DBT* descriptor, u_int32_t ...@@ -483,11 +483,11 @@ toku_db_change_descriptor(DB *db, DB_TXN* txn, const DBT* descriptor, u_int32_t
BOOL update_cmp_descriptor = ((flags & DB_UPDATE_CMP_DESCRIPTOR) != 0); BOOL update_cmp_descriptor = ((flags & DB_UPDATE_CMP_DESCRIPTOR) != 0);
toku_init_dbt(&old_descriptor); toku_init_dbt(&old_descriptor);
if (!db_opened(db) || !txn || !descriptor || (descriptor->size>0 && !descriptor->data)){ if (!db_opened(db) || !descriptor || (descriptor->size>0 && !descriptor->data)){
r = EINVAL; r = EINVAL;
goto cleanup; goto cleanup;
} }
if (txn->parent != NULL) { if (txn && txn->parent != NULL) {
r = EINVAL; // cannot have a parent if you are a resetting op r = EINVAL; // cannot have a parent if you are a resetting op
goto cleanup; goto cleanup;
} }
......
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