Commit 914cde44 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

closes #5691, add comment

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@50057 c7de825b-a66e-492c-adef-691d508d4ae1
parent e803eb67
......@@ -5859,6 +5859,13 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
uint32_t txn_begin_flags;
if (trx->all == NULL) {
txn_begin_flags = toku_iso_to_txn_flag(toku_iso_level);
//
// if the isolation level that the user has set is serializable,
// but autocommit is on and this is just a select,
// then we can go ahead and set the isolation level to
// be a snapshot read, because we can serialize
// the transaction to be the point in time at which the snapshot began.
//
if (txn_begin_flags == 0 && is_autocommit && thd_sql_command(thd) == SQLCOM_SELECT) {
txn_begin_flags = DB_TXN_SNAPSHOT;
}
......
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