diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-06-05 15:59:46 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-06-05 15:59:46 +0200 |
commit | 2d2697ea8d6b6ef07836c9af06fc0d4eca6aa77b (patch) | |
tree | 7d08a0107411367968a068e7726ba0c7d92aa3c4 /mysql-test/r/select_found.result | |
parent | fde6ee61bbdeb051a169aac8da56e24bf2accdce (diff) | |
download | mariadb-git-2d2697ea8d6b6ef07836c9af06fc0d4eca6aa77b.tar.gz |
MDEV-6221 SQL_CALC_FOUND_ROWS yields wrong result again
replace another old "was there a filesort?" test with
a correct "did filesort calculate found_rows?" test.
Diffstat (limited to 'mysql-test/r/select_found.result')
-rw-r--r-- | mysql-test/r/select_found.result | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 933c69055a1..04eb2c90d31 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -315,3 +315,20 @@ select found_rows(); found_rows() 128 drop table t1, t2; +create table t1 (i1 int, v1 int, primary key(i1,v1)); +insert into t1 values (1,1),(2,2),(3,3); +create table t2 (i2 int primary key, v2 int); +insert into t2 values (1,5),(2,5),(3,10); +select 1 as res from t1 left join t2 on i1 = i2 where v2 = 5 or v1 = 5 or v1 = 10 order by v1; +res +1 +1 +select sql_calc_found_rows 1 as res from t1 left join t2 on i1 = i2 where v2 = 5 or v1 = 5 or v1 = 10 order by v1 limit 1; +select found_rows() as count; +count +2 +select sql_calc_found_rows 1 as res from t1 left join t2 on i1 = i2 where v2 = 5 order by v1 limit 1; +select found_rows() as count; +count +2 +drop table t1, t2; |