summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2003-04-20 22:18:32 +0300
committerbell@sanja.is.com.ua <>2003-04-20 22:18:32 +0300
commit12181f6f6e42c7273441e6b671eb6f2a4b0cf7a2 (patch)
treeef52a64a34de1f8c132ed5ceac72f3c8f9421496 /sql/sql_cache.cc
parentfc61731b69e75cb02ad417d863ad0139e2eabd51 (diff)
downloadmariadb-git-12181f6f6e42c7273441e6b671eb6f2a4b0cf7a2.tar.gz
fixed bug in processing transaction in query cache (inserted lost lines)
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc9
1 files changed, 9 insertions, 0 deletions
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);