summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_sj.test
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2012-03-19 01:04:55 +0400
committerSergey Petrunya <psergey@askmonty.org>2012-03-19 01:04:55 +0400
commit91d17a9c209627dab852d7904479aa254e344fa2 (patch)
tree394751110536ad76e3f9f5b115a124623bc540b8 /mysql-test/t/subselect_sj.test
parent5338a28912589f1169b66b880a489ec5636bcd83 (diff)
downloadmariadb-git-91d17a9c209627dab852d7904479aa254e344fa2.tar.gz
BUG#952583: Server crashes in Item_field::fix_after_pullout on INSERT .. SELECT
- Take into account that there may exist Item_field objects with context==NULL.
Diffstat (limited to 'mysql-test/t/subselect_sj.test')
-rw-r--r--mysql-test/t/subselect_sj.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index 6b8a757b9e8..fe290cf4a97 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2331,5 +2331,19 @@ explain select * from t3 where a in (select kp1 from t1 where kp1<20);
drop table t0,t1,t3;
set optimizer_switch= @tmp_923246;
+--echo #
+--echo # BUG#952583: Server crashes in Item_field::fix_after_pullout on INSERT .. SELECT
+--echo #
+CREATE TABLE t1 ( a INT );
+INSERT INTO t1 VALUES (1),(2);
+CREATE TABLE t2 ( b INT );
+INSERT INTO t2 VALUES (3),(4);
+
+INSERT INTO t1
+SELECT * FROM ( SELECT * FROM t1 ) AS alias
+WHERE a IN ( SELECT b FROM t2 );
+
+DROP TABLE t1, t2;
+
# The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp;