diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 20:59:57 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-24 20:59:57 +0300 |
commit | 7396dfcca7a1eb906edabec02fb59d168f09343d (patch) | |
tree | 5971546f2d27f5a8dc186e0f63ae3d2ac9208a6a /mysql-test/main/subselect4.test | |
parent | f79c5a658cc33a10d7744a748a4328254e2cbaf7 (diff) | |
parent | 7b5543b21d31bd1517b49c2524a05b5b83fd9691 (diff) | |
download | mariadb-git-7396dfcca7a1eb906edabec02fb59d168f09343d.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'mysql-test/main/subselect4.test')
-rw-r--r-- | mysql-test/main/subselect4.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test index 77ea117b15f..d5a40419185 100644 --- a/mysql-test/main/subselect4.test +++ b/mysql-test/main/subselect4.test @@ -2044,6 +2044,29 @@ SET optimizer_switch= @@global.optimizer_switch; set @@tmp_table_size= @@global.tmp_table_size; --echo # +--echo # MDEV-14515: Wrong results for tableless query with subquery in WHERE +--echo # and implicit aggregation +--echo # + +create table t1 (i1 int, i2 int); +insert into t1 values (1314, 1084),(1330, 1084),(1401, 1084),(580, 1084); + +create table t2 (cd int); +insert into t2 values + (1330), (1330), (1330), (1330), (1330), (1330), (1330), (1330), + (1330), (1330), (1330), (1330), (1330), (1330), (1330), (1330); + +select max(10) from dual + where exists (select 1 from t2 join t1 on t1.i1 = t2.cd and t1.i2 = 345); + +insert into t2 select * from t2; + +select max(10) from dual + where exists (select 1 from t2 join t1 on t1.i1 = t2.cd and t1.i2 = 345); + +DROP TABLE t1,t2; + +--echo # --echo # MDEV-10232 Scalar result of subquery changes after adding an outer select stmt --echo # |