mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed proccesing global LIMIT in last SELECT of UNION
mysql-test/r/subselect.result: correct results mysql-test/r/union.result: correct results mysql-test/t/subselect.test: to be sure that results are correct sql/sql_parse.cc: comment + TODO
This commit is contained in:
@ -409,7 +409,7 @@ found_rows()
|
||||
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2,2;
|
||||
a
|
||||
3
|
||||
5
|
||||
4
|
||||
select found_rows();
|
||||
found_rows()
|
||||
6
|
||||
@ -423,7 +423,7 @@ found_rows()
|
||||
5
|
||||
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a desc LIMIT 1;
|
||||
a
|
||||
3
|
||||
5
|
||||
(SELECT * FROM t1 ORDER by a) UNION ALL (SELECT * FROM t2 ORDER BY a) ORDER BY A desc LIMIT 4;
|
||||
a
|
||||
5
|
||||
|
Reference in New Issue
Block a user