summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect_sj_jcl6.result
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-01-25 16:56:57 +0200
committerunknown <sanja@askmonty.org>2013-01-25 16:56:57 +0200
commit298008dc4fbf4c5cc98d86115218bf89611ff7ea (patch)
tree8d75064261148ea25f099d26e4ac65e5f1848b63 /mysql-test/r/subselect_sj_jcl6.result
parentde10e214115ecc89087386ecad8bddee2a1e1608 (diff)
downloadmariadb-git-298008dc4fbf4c5cc98d86115218bf89611ff7ea.tar.gz
The problem was that expression with field after transformation (on the first execution)
reached by fix_fields() (via reference) before row which it belongs to (on the second execution) and fix_field for row did not follow usual protocol for Items with argument (first check that the item fixed then call fix_fields). Item_row::fix_field fixed.
Diffstat (limited to 'mysql-test/r/subselect_sj_jcl6.result')
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index 6247688d635..cf45162284c 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -2771,6 +2771,21 @@ GROUP BY b
HAVING t1sum <> 1;
t1sum b
DROP TABLE t1, t2;
+#
+# MDEV-3911: Assertion `fixed == 0' failed in Item_field::fix_fields
+# on 2nd execution of PS with semijoin=on and IN subquery
+#
+CREATE TABLE t1 (a INT, b INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (0,4),(8,6);
+CREATE TABLE t2 (c INT, d INT) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (7,1),(0,7);
+PREPARE stmt FROM ' SELECT * FROM t1 WHERE ( a, b ) IN ( SELECT c, d FROM t2 ) ';
+execute stmt;
+a b
+execute stmt;
+a b
+deallocate prepare stmt;
+drop table t1,t2;
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off