Commit ce5691d8 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4876], small change to toku_txn_begin relating to input flags

git-svn-id: file:///svn/toku/tokudb@44110 c7de825b-a66e-492c-adef-691d508d4ae1
parent c8ab6ce3
...@@ -374,10 +374,6 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags) { ...@@ -374,10 +374,6 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags) {
} }
flags &= ~iso_flags; flags &= ~iso_flags;
if (stxn) {
child_isolation = db_txn_struct_i(stxn)->iso;
}
else {
switch (iso_flags) { switch (iso_flags) {
case (DB_INHERIT_ISOLATION): case (DB_INHERIT_ISOLATION):
if (stxn) { if (stxn) {
...@@ -401,14 +397,15 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags) { ...@@ -401,14 +397,15 @@ toku_txn_begin(DB_ENV *env, DB_TXN * stxn, DB_TXN ** txn, u_int32_t flags) {
child_isolation = TOKU_ISO_SNAPSHOT; child_isolation = TOKU_ISO_SNAPSHOT;
break; break;
case (DB_SERIALIZABLE): case (DB_SERIALIZABLE):
case (0):
child_isolation = TOKU_ISO_SERIALIZABLE; child_isolation = TOKU_ISO_SERIALIZABLE;
break; break;
case (0):
child_isolation = stxn ? db_txn_struct_i(stxn)->iso : TOKU_ISO_SERIALIZABLE;
break;
default: default:
assert(FALSE); // error path is above, so this should not happen assert(FALSE); // error path is above, so this should not happen
break; break;
} }
}
if (stxn && child_isolation != db_txn_struct_i(stxn)->iso) { if (stxn && child_isolation != db_txn_struct_i(stxn)->iso) {
return toku_ydb_do_error( return toku_ydb_do_error(
env, env,
......
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