1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

SQL: WHERE cond freed prematurely for PS [#365 bug 10]

Applicable to vanilla version.
Applies to Item_cond_and, etc.: items with allocating copy_andor_structure().

Tests affected (forced mode):

main.subselect_sj
main.subselect_sj_jcl6
This commit is contained in:
Aleksey Midenkov
2017-12-05 12:21:25 +03:00
parent 3d88a72f76
commit 6ac773421f
3 changed files with 25 additions and 2 deletions

View File

@@ -199,9 +199,18 @@ where exists (select 1 from t2 where t2.b = t1.a and t2.b = t1.a);
create or replace table t1 (x int) with system versioning;
select t1.x in (select x from t1) a from t1, (select x from t1) b;
--echo ### Issue #365, bug 10 (WHERE cond freed prematurely for PS)
create or replace table t1 (x int) with system versioning;
insert into t1 values (1);
create or replace view v1 as select x from t1 where x = 1;
prepare stmt from "
select x from t1 where x in (select x from v1);";
execute stmt;
execute stmt;
drop view v1;
drop table t1, t2;
call innodb_verify_vtq(28);
call innodb_verify_vtq(29);
-- source suite/versioning/common_finish.inc