From 12181f6f6e42c7273441e6b671eb6f2a4b0cf7a2 Mon Sep 17 00:00:00 2001 From: "bell@sanja.is.com.ua" <> Date: Sun, 20 Apr 2003 22:18:32 +0300 Subject: fixed bug in processing transaction in query cache (inserted lost lines) --- sql/sql_cache.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql/sql_cache.cc') 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); -- cgit v1.2.1