diff options
author | unknown <sanja@montyprogram.com> | 2013-01-16 15:11:13 +0200 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2013-01-16 15:11:13 +0200 |
commit | a716b061676d01920fa83298cd1fbb57725d6ad9 (patch) | |
tree | 92feb20e407af0d325f817b06608e457b156dec7 /mysql-test/t/subselect_innodb.test | |
parent | 12bf6fe85893f6a69a74ec1c733e533051058dd3 (diff) | |
download | mariadb-git-a716b061676d01920fa83298cd1fbb57725d6ad9.tar.gz |
MDEV-3988 fix.
Subquery turned into constant too late to be excluded from grouping list so test for constant added to the create_temp_table().
Diffstat (limited to 'mysql-test/t/subselect_innodb.test')
-rw-r--r-- | mysql-test/t/subselect_innodb.test | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test index 26ff1072e30..f6ac5204c3e 100644 --- a/mysql-test/t/subselect_innodb.test +++ b/mysql-test/t/subselect_innodb.test @@ -368,4 +368,18 @@ select 1 from t1 where 1 like (select 1 from t1 where 1 <=> (select 1 from t1 gr drop table t1; +--echo # +--echo # MDEV-3988 crash in create_tmp_table +--echo # + +drop table if exists `t1`,`t2`; +create table `t1`(`a` char(1) character set utf8)engine=innodb; +create table `t2`(`b` char(1) character set utf8)engine=memory; +select distinct (select 1 from `t2` where `a`) `d2` from `t1`; +select distinct (select 1 from `t2` where `a`) `d2`, a from `t1`; +select distinct a, (select 1 from `t2` where `a`) `d2` from `t1`; +select distinct (1 + (select 1 from `t2` where `a`)) `d2` from `t1`; + +drop table t1,t2; + set optimizer_switch=@subselect_innodb_tmp; |