mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
MDEV-7219 SQL_CALC_FOUND_ROWS yields wrong result
revert the code in filesort that conditionally updated 'found_rows', rely on filesort_limit_arg instead.
This commit is contained in:
@@ -332,3 +332,19 @@ select found_rows() as count;
|
||||
count
|
||||
2
|
||||
drop table t1, t2;
|
||||
create table t1 (i int, v varchar(64), key (i));
|
||||
select sql_calc_found_rows * from t1 where i = 0 order by v limit 59,2;
|
||||
i v
|
||||
0 foo
|
||||
0 foo
|
||||
select found_rows();
|
||||
found_rows()
|
||||
75
|
||||
select sql_calc_found_rows * from t1 ignore index (i) where i = 0 order by v limit 59,2;
|
||||
i v
|
||||
0 foo
|
||||
0 foo
|
||||
select found_rows();
|
||||
found_rows()
|
||||
75
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user