Merge branch '10.0' into 10.1

This commit is contained in:
Vicențiu Ciorbaru 2017-01-16 03:18:14 +02:00
commit 8e15768731
180 changed files with 10539 additions and 2460 deletions

View file

@ -1057,7 +1057,6 @@ ORDER BY a;
DROP TABLE t1;
--echo End of 5.0 tests
-- echo #
-- echo # Bug#32858: Error: "Incorrect usage of UNION and INTO" does not take
-- echo # subselects into account
@ -1160,6 +1159,8 @@ create table t1 (a int);
insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10);
--sorted_result
select a from t1 where false UNION select a from t1 limit 8;
--sorted_result
(select a from t1 where false) UNION (select a from t1) limit 8;
drop table t1;
--echo #
@ -1385,6 +1386,26 @@ UNION
drop table t1;
--echo #
--echo # MDEV-10172: UNION query returns incorrect rows outside
--echo # conditional evaluation
--echo #
create table t1 (d datetime not null primary key);
insert into t1(d) values ('2016-06-01'),('2016-06-02'),('2016-06-03'),('2016-06-04');
select * from
(
select * from t1 where d between '2016-06-02' and '2016-06-05'
union
(select * from t1 where d < '2016-06-05' order by d desc limit 1)
) onlyJun2toJun4
order by d;
drop table t1;
--echo End of 5.0 tests
--echo #
--echo # WL#1763 Avoid creating temporary table in UNION ALL
--echo #
@ -1486,4 +1507,3 @@ SELECT * FROM t1 t1_1 LEFT JOIN t1 t1_2 ON ( t1_2.b = t1_1.a )
WHERE t1_2.b NOT IN ( SELECT 4 UNION ALL SELECT 5 );
DROP TABLE t1;