summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-04-20 22:18:32 +0300
committerunknown <bell@sanja.is.com.ua>2003-04-20 22:18:32 +0300
commita320421abc6fc425c14a647534fae0883e4fec1d (patch)
treeef52a64a34de1f8c132ed5ceac72f3c8f9421496 /sql/sql_cache.cc
parent43f1511a31a8e47682410ca5b02eb0dd4aba16d8 (diff)
downloadmariadb-git-a320421abc6fc425c14a647534fae0883e4fec1d.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);