summaryrefslogtreecommitdiff
path: root/mysql-test/main/subselect_sj.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/subselect_sj.result')
-rw-r--r--mysql-test/main/subselect_sj.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result
index f3519e1d846..3af248e7ab2 100644
--- a/mysql-test/main/subselect_sj.result
+++ b/mysql-test/main/subselect_sj.result
@@ -3318,4 +3318,22 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 500
drop table t1, t2, t3, t4;
+#
+# MDEV-20770: Server crashes in JOIN::transform_in_predicates_into_in_subq
+# upon 2nd execution of PS/SP comparing GEOMETRY with other types
+#
+CREATE TABLE t1 (a GEOMETRY);
+CREATE TABLE t2 (b INT);
+INSERT INTO t1 VALUES (GeomFromText('POINT(0 0)')),(GeomFromText('POINT(1 1)'));
+INSERT INTO t2 VALUES (1),(2);
+PREPARE stmt FROM "SELECT * from t1 WHERE a IN (SELECT b FROM t2)";
+EXECUTE stmt;
+ERROR HY000: Illegal parameter data types geometry and int for operation '='
+EXECUTE stmt;
+ERROR HY000: Illegal parameter data types geometry and int for operation '='
+EXECUTE stmt;
+ERROR HY000: Illegal parameter data types geometry and int for operation '='
+EXECUTE stmt;
+ERROR HY000: Illegal parameter data types geometry and int for operation '='
+DROP TABLE t1, t2;
set optimizer_switch=@subselect_sj_tmp;