summaryrefslogtreecommitdiff
path: root/mysql-test/t/subselect_sj.test
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2015-04-21 15:41:01 +0300
committerSergei Petrunia <psergey@askmonty.org>2015-04-21 15:41:01 +0300
commite428c809d7e2176834ed9889483643e4ef2c2c2b (patch)
treec9f9285113efe778ed5e8cdd2bcd7ebda29f7e97 /mysql-test/t/subselect_sj.test
parentf1f8adf0983f5559e6791032b490b7e43cf2933c (diff)
downloadmariadb-git-e428c809d7e2176834ed9889483643e4ef2c2c2b.tar.gz
MDEV-7911: crash in Item_cond::eval_not_null_tables
convert_subq_to_sj() must check the results of in_equality->fix_fields() call. It can fail in a meaningful way when e.g. we're trying to compare columns with incompatible collations.
Diffstat (limited to 'mysql-test/t/subselect_sj.test')
-rw-r--r--mysql-test/t/subselect_sj.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index 1b0076fd1e6..9d7ea17bbe2 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -2689,5 +2689,16 @@ SET join_cache_level=@tmp_mdev5059;
set optimizer_switch=@tmp_os_mdev5059;
DROP TABLE t1,t2,t3,t4;
+--echo #
+--echo # MDEV-7911: crash in Item_cond::eval_not_null_tables
+--echo #
+
+create table t1(a int);
+insert into t1 values(1),(2),(3),(null);
+--error ER_CANT_AGGREGATE_2COLLATIONS
+explain
+select 1 from t1 where _cp932 "1" in (select '1' from t1);
+drop table t1;
+
# The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp;