From a320421abc6fc425c14a647534fae0883e4fec1d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 20 Apr 2003 22:18:32 +0300 Subject: [PATCH] fixed bug in processing transaction in query cache (inserted lost lines) --- sql/sql_cache.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index b7c6ff66856..d8265a1b359 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -968,6 +968,15 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) } DBUG_PRINT("qcache", ("Query have result 0x%lx", (ulong) query)); + if ((thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && + (query->tables_type() & HA_CACHE_TBL_TRANSACT)) + { + DBUG_PRINT("qcache", + ("we are in transaction and have transaction tables in query")); + BLOCK_UNLOCK_RD(query_block); + goto err_unlock; + } + check_tables= query->tables_type() & HA_CACHE_TBL_ASKTRANSACT; // Check access; block_table= query_block->table(0);