1
0
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:
Sergei Golubchik
2015-01-19 14:18:44 +01:00
parent ce0ed977d5
commit 47c844f236
5 changed files with 48 additions and 20 deletions

View File

@@ -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;