diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-05-03 00:10:43 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-05-03 00:10:43 +0400 |
commit | 6ed00c4d8a90129e7098bcb5fad5b01332e9882c (patch) | |
tree | 162d5b00e042e0a8149c601c1232cbfdf5831066 /mysql-test/t/subselect_sj_mat.test | |
parent | 8d75f11a67d620727b87ef3a00d61a6f92418817 (diff) | |
download | mariadb-git-6ed00c4d8a90129e7098bcb5fad5b01332e9882c.tar.gz |
MDEV-4465: Reproducible crash (mysqld got signal 11) in multi_delete::initialize_tables...
- make multi_delete::initialize_tables() take into account that the JOIN structure may have
semi-join nests (which are not fully initialized when this function is called, they have
tab->table=NULL which caused the crash)
- Also checked multi_update::initialize_tables(): it has a different logic and needed no fixing.
Diffstat (limited to 'mysql-test/t/subselect_sj_mat.test')
-rw-r--r-- | mysql-test/t/subselect_sj_mat.test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test index 4c40b2b5487..711f2f4f9b6 100644 --- a/mysql-test/t/subselect_sj_mat.test +++ b/mysql-test/t/subselect_sj_mat.test @@ -1677,6 +1677,25 @@ SELECT * FROM t1, t2 WHERE b1 IN ( SELECT b2 FROM t2 WHERE b1 > 'o' ) AND ( b1 < DROP TABLE t1,t2; +--echo # +--echo # MDEV-4465: Reproducible crash (mysqld got signal 11) in multi_delete::initialize_tables with semijoin+materialization +--echo # +CREATE TABLE t1 ( + id int(11) NOT NULL +); + +CREATE TABLE t2 ( + id int(11) NOT NULL, + a_id int(11) DEFAULT NULL +); + +insert into t1 values (1), (2), (3); +insert into t2 values (1, 1), (2, 1), (3, 1), (4, 2), (5, 3), (6, 3), (7, 3); + +delete t2 from t2 where a_id in (select * from (select t1.id from t1 limit 2) as x); + +drop table t1,t2; + --echo # This must be at the end: set optimizer_switch=@subselect_sj_mat_tmp; set join_cache_level=@save_join_cache_level; |