diff options
author | Magne Mahre <magne.mahre@sun.com> | 2010-10-06 11:01:24 +0200 |
---|---|---|
committer | Magne Mahre <magne.mahre@sun.com> | 2010-10-06 11:01:24 +0200 |
commit | 653f14c2659160b1fda7f3fceb0988fa90731d4d (patch) | |
tree | 8e81ffa629578564a5e5fea2294b439ce27058ee /mysql-test/r/cache_innodb.result | |
parent | e53e16a885937a902b10d4ab0293f3ec0905e355 (diff) | |
download | mariadb-git-653f14c2659160b1fda7f3fceb0988fa90731d4d.tar.gz |
Bug#56452 Assertion failed: thd->transaction.stmt.is_empty() ||
thd->in_sub_stmt
In a precursor patch for Bug#52044
(revid:bzr/kostja@stripped), a
number of reorganizations of code was made. In addition some
assertions were added to ensure the correct transactional state.
The reorganization had a small glitch so statements that was
active in the query cache was not followed by a
statement commit/rollback (this code was removed). A section
in the trans_commit_stmt/trans_rollback_stmt code is to
clear the thd->transaction.stmt list of affected storage
engines. When a new statement is initiated, an assert
introduced by the 523044 patch checks if this list is cleared.
When the query cache is accessed, this list may be populated,
and since it's not committed it will not be cleared.
This fix adds explicit statement commit or rollback for
statements that is contained in the query cache.
Diffstat (limited to 'mysql-test/r/cache_innodb.result')
-rw-r--r-- | mysql-test/r/cache_innodb.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/cache_innodb.result b/mysql-test/r/cache_innodb.result index 600ed84c3c9..293d7a3f412 100644 --- a/mysql-test/r/cache_innodb.result +++ b/mysql-test/r/cache_innodb.result @@ -220,3 +220,14 @@ Variable_name Value Qcache_hits 1 set GLOBAL query_cache_size=1048576; drop table t2; +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +BEGIN; +INSERT INTO t1 VALUES(1); +ROLLBACK WORK AND CHAIN NO RELEASE; +SELECT a FROM t1; +a +ROLLBACK WORK AND CHAIN NO RELEASE; +SELECT a FROM t1; +a +ROLLBACK; +DROP TABLE t1; |