Commit fcff3f9
Tor Didriksen
Bug#68458 Wrong count from FOUND_ROWS() on MySQL 5.6
Bug#16383173 WRONG COUNT FROM FOUND_ROWS() ON MYSQL 5.6
The handling of SQL_CALC_FOUND_ROWS in combination with
"order by with limit" was not specific enough,
and could lead to wrong results for FOUND_ROWS()
The bug was that we took 'limit_found_rows' from filesort()
for cases where filesort() did not produce the final result.
Solution: let filesort() tell the execution machinery
that a priority queue was in fact used to filter the result.1 parent ae21683 commit fcff3f9
3 files changed
+18
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
936 | | - | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
937 | 945 | | |
938 | 946 | | |
939 | 947 | | |
| |||
950 | 958 | | |
951 | 959 | | |
952 | 960 | | |
953 | | - | |
| 961 | + | |
954 | 962 | | |
955 | 963 | | |
956 | 964 | | |
| |||
2773 | 2781 | | |
2774 | 2782 | | |
2775 | 2783 | | |
2776 | | - | |
2777 | | - | |
2778 | | - | |
| 2784 | + | |
| 2785 | + | |
2779 | 2786 | | |
2780 | 2787 | | |
2781 | 2788 | | |
2782 | 2789 | | |
2783 | 2790 | | |
2784 | 2791 | | |
2785 | | - | |
| 2792 | + | |
2786 | 2793 | | |
2787 | 2794 | | |
2788 | 2795 | | |
| |||
0 commit comments