[MDEV-3428] LP:732124 - union + limit returns wrong result Created: 2011-03-09  Updated: 2015-02-02  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Michael Widenius Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug732124.xml    

 Description   

create table t1 (a int);
insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10);
select a from t1 where false UNION select a from t1 limit 8;

->
------

a

------

10
2
3
4
5
6

------
6 rows in set

Which is wrong as there should be 8 rows in the result

This only happens with union distinct without order by.



 Comments   
Comment by Michael Widenius [ 2011-03-09 ]

Re: union + limit returns wrong result
Fix pushed into 5.1 trunk

Comment by Rasmus Johansson (Inactive) [ 2011-03-09 ]

Launchpad bug id: 732124

Generated at Thu Feb 08 06:48:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.