mirror of
https://github.com/MariaDB/server.git
synced 2025-10-24 07:13:33 +03:00
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.
32 lines
707 B
Plaintext
32 lines
707 B
Plaintext
# t/cache_innodb.test
|
|
#
|
|
# Last update:
|
|
# 2006-07-26 ML test refactored (MySQL 5.1)
|
|
# main code t/innodb_cache.test --> include/query_cache.inc
|
|
# new wrapper t/cache_innodb.test
|
|
#
|
|
|
|
--source include/have_query_cache.inc
|
|
|
|
--source include/have_innodb.inc
|
|
let $engine_type= InnoDB;
|
|
# InnoDB supports FOREIGN KEYs
|
|
let $test_foreign_keys= 1;
|
|
|
|
--source include/query_cache.inc
|
|
|
|
#
|
|
# Bug#56452 Assertion failed: thd->transaction.stmt.is_empty() ||
|
|
# thd->in_sub_stmt
|
|
#
|
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(1);
|
|
ROLLBACK WORK AND CHAIN NO RELEASE;
|
|
SELECT a FROM t1;
|
|
ROLLBACK WORK AND CHAIN NO RELEASE;
|
|
SELECT a FROM t1;
|
|
ROLLBACK;
|
|
DROP TABLE t1;
|
|
|