Bug #25445 LIMIT returns incorrect result when used with LEFT JOIN, GROUP BY, and DISTINCT
| Submitted: | 6 Jan 2007 2:44 | Modified: | 6 Jan 2007 3:08 |
|---|---|---|---|
| Reporter: | Jared Luxenberg | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.24a | OS: | Linux (Ubuntu (Debian)) |
| Assigned to: | CPU Architecture: | Any |
[6 Jan 2007 2:44]
Jared Luxenberg
[6 Jan 2007 3:08]
MySQL Verification Team
Thank you for your bug report. This issue has already been fixed in the latest released version of that product, which you can download at
http://www.mysql.com/downloads/
mysql> select type, count(distinct(tmp.id)) count from tmp group by type limit 0,2;
+------+-------+
| type | count |
+------+-------+
| bar | 5 |
| foo | 5 |
+------+-------+
2 rows in set (0.05 sec)
mysql> select type, count(distinct(tmp.id)) count from tmp left join tmp_properties tp
-> on tp.id = tmp.type group by type limit 0,2;
+------+-------+
| type | count |
+------+-------+
| bar | 5 |
| foo | 5 |
+------+-------+
2 rows in set (0.06 sec)
mysql> select version();
+---------------------+
| version() |
+---------------------+
| 5.0.27-community-nt |
+---------------------+
1 row in set (0.00 sec)
mysql>
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.