Commit acab0faa authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

MDEV-7038 Assertion `status_var.memory_used == 0' failed in THD::~THD() on...

MDEV-7038 Assertion `status_var.memory_used == 0' failed in THD::~THD() on disconnect after executing EXPLAIN for multi-table UPDATE

Added test case that caught this bug. It is no longer reproducible in
the current tree.
parent 37093eb5
...@@ -219,3 +219,16 @@ OK ...@@ -219,3 +219,16 @@ OK
OK OK
drop function f1; drop function f1;
drop table t1; drop table t1;
#
# MDEV-7038: Assertion `status_var.memory_used == 0' failed in THD::~THD()
# on disconnect after executing EXPLAIN for multi-table UPDATE
#
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1;
INSERT INTO t1 VALUES (1),(2);
EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
1 SIMPLE user index NULL PRIMARY 420 NULL 4 Using index
DROP TABLE t1;
DROP VIEW v1;
...@@ -197,4 +197,14 @@ select 'OK'; ...@@ -197,4 +197,14 @@ select 'OK';
drop function f1; drop function f1;
drop table t1; drop table t1;
--echo #
--echo # MDEV-7038: Assertion `status_var.memory_used == 0' failed in THD::~THD()
--echo # on disconnect after executing EXPLAIN for multi-table UPDATE
--echo #
CREATE TABLE t1 (a INT);
CREATE VIEW v1 AS SELECT * FROM t1;
INSERT INTO t1 VALUES (1),(2);
EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1;
DROP TABLE t1;
DROP VIEW v1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment