diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2015-08-31 18:40:24 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2015-08-31 18:40:24 +0200 |
commit | 4b41e3c7f33714186c97a6cc2e6d3bb93b050c61 (patch) | |
tree | fdc312b7d2f3ed8f12af293f8f724c5148d91227 /mysql-test/r | |
parent | b66455f67da9b0bbe7fb7862c23a8283d766e149 (diff) | |
download | mariadb-git-4b41e3c7f33714186c97a6cc2e6d3bb93b050c61.tar.gz |
MDEV-6219: Server crashes in Bitmap<64u>::merge (this=0x180, map2=...) on 2nd execution of PS with INSERT .. SELECT, derived_merge
Problem: Not all permanent Item_direct_view_ref was in permanent list of used items of the view.
Solution: Detect creating permenent view/derived table reference and put them in the permanent list at once.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/derived.result | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index 7c44466ae92..2b0b1041936 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -567,7 +567,31 @@ insert into t1 (accountId,balance) values update t1 set balance=(select sum(balance) from (SELECT balance FROM t1 where accountId like 'dealer%') AS copied) where accountId = 'OPERATOR'; set optimizer_switch=@save_derived_optimizer_switch_bug; drop table t1; -set optimizer_switch=@save_derived_optimizer_switch; +# +# MDEV-6219:Server crashes in Bitmap<64u>::merge +# (this=0x180, map2=...) on 2nd execution of PS with INSERT .. SELECT, +# derived_merge +# +CREATE TABLE t1 (a VARCHAR(8)) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('foo'),('bar'); +create procedure p1() +INSERT INTO t1 SELECT * FROM ( +SELECT * FROM t1 +) AS sq +WHERE sq.a IN ( SELECT 'baz' FROM DUAL ); +call p1(); +call p1(); +drop procedure p1; +PREPARE stmt FROM " + INSERT INTO t1 SELECT * FROM ( + SELECT * FROM t1 + ) AS sq + WHERE sq.a IN ( SELECT 'baz' FROM DUAL ) +"; +EXECUTE stmt; +EXECUTE stmt; +deallocate prepare stmt; +drop table t1; # # MDEV-6892: WHERE does not apply # @@ -580,3 +604,4 @@ select x.id, message from (select id from t1) x left join where coalesce(message,0) <> 0; id message drop table t1,t2; +set optimizer_switch=@save_derived_optimizer_switch; |