Bug #6089 | FOUND_ROWS returns wrong values when no table/view is used | ||
---|---|---|---|
Submitted: | 14 Oct 2004 10:45 | Modified: | 2 Mar 2005 21:14 |
Reporter: | Georg Richter | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1 | OS: | Linux (Linux) |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[14 Oct 2004 10:45]
Georg Richter
[14 Oct 2004 12:07]
MySQL Verification Team
Verified with 4.1.6 and 5.0.2
[15 Oct 2004 23:23]
Konstantin Osipov
I'm not sure if it's the same issue, or should be moved to a separate bug, but if found_rows() is used in any non-trivial query, it always returns 0: mysql> select * FROM t1 limit 1; +------+ | a | +------+ | 1 | +------+ 1 row in set (0.00 sec) mysql> select found_rows(); +--------------+ | found_rows() | +--------------+ | 1 | +--------------+ 1 row in set (0.00 sec) mysql> select * FROM t1 limit 1; +------+ | a | +------+ | 1 | +------+ 1 row in set (0.00 sec) mysql> select *, found_rows() from t1 limit 1; +------+--------------+ | a | found_rows() | +------+--------------+ | 1 | 0 | +------+--------------+ 1 row in set (0.00 sec)
[1 Mar 2005 11:19]
Ramil Kalimullin
fixed in 4.1.11
[2 Mar 2005 15:32]
Konstantin Osipov
Reviewed additional patch to make the previos patch prepared-statements friendly.
[2 Mar 2005 21:14]
Paul DuBois
Noted in 4.1.11 changelog.