diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-02-11 20:42:16 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-02-15 13:02:21 +0100 |
commit | 9630eda0de3c176615925d15eddba8d1780b1398 (patch) | |
tree | 20e66c90f276ca22bd8f2abfd3373ffbad63fbbb /mysql-test/r/select_found.result | |
parent | 38b89a61c3ace83b32c079489922a0cae5106b56 (diff) | |
download | mariadb-git-9630eda0de3c176615925d15eddba8d1780b1398.tar.gz |
MDEV-9390 Function found_rows() gives incorrect result where the previous SELECT contains ORDER BY clause
use the raw found_rows value only when SQL_CALC_FOUND_ROWS was specified
Diffstat (limited to 'mysql-test/r/select_found.result')
-rw-r--r-- | mysql-test/r/select_found.result | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 92758fa134b..7b38515cf70 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -348,3 +348,18 @@ select found_rows(); found_rows() 75 drop table t1; +create table t1(c1 int); +insert into t1 values(1),(2),(3),(4),(5); +select * from t1 order by c1 limit 2,1; +c1 +3 +select found_rows(); +found_rows() +3 +select sql_calc_found_rows * from t1 order by c1 limit 2,1; +c1 +3 +select found_rows(); +found_rows() +5 +drop table t1; |