Bug #80148 | found_rows() is not working as expected without sql_calc_found_rows | ||
---|---|---|---|
Submitted: | 26 Jan 2016 7:41 | Modified: | 31 May 2016 15:59 |
Reporter: | Su Dylan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.7.8 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Jan 2016 7:41]
Su Dylan
[26 Jan 2016 16:19]
MySQL Verification Team
I have tested your report and I have repeated it even with much earlier versions of 5.7. I even repeated it with 5.6.12. Correct result returned by "SELECT FOUND_ROWS()" should be indeed 2. Verified as reported.
[31 May 2016 15:59]
Paul DuBois
Posted by developer: Noted in 5.7.14 changelog. In the absence of SQL_CALC_FOUND_ROWS, FOUND_ROWS() for a UNION statement always returned the actual number of rows found even when LIMIT was present.