1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2018-04-24 20:59:57 +03:00
101 changed files with 705 additions and 257 deletions

View File

@@ -2043,6 +2043,29 @@ SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
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 #