refs #6058, make a handlerton fix for stored functions

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@54330 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Zardosht Kasheff 2013-03-13 02:53:05 +00:00 committed by Yoni Fogel
parent 9a01a01d73
commit 1aa67788b0

View file

@ -6091,7 +6091,7 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
if (txn_begin_flags == 0 && is_autocommit && thd_sql_command(thd) == SQLCOM_SELECT) {
txn_begin_flags = DB_TXN_SNAPSHOT;
}
if (is_autocommit && thd_sql_command(thd) == SQLCOM_SELECT && !thd->in_sub_stmt && lock.type <= TL_READ_NO_INSERT) {
if (is_autocommit && thd_sql_command(thd) == SQLCOM_SELECT && !thd->in_sub_stmt && lock.type <= TL_READ_NO_INSERT && !thd->lex->uses_stored_routines()) {
txn_begin_flags |= DB_TXN_READ_ONLY;
}
}