diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-19 20:33:12 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-19 20:33:12 +0100 |
commit | 9418bd9c2167ef6a75d7d1bfaaf5e2cf94d09bae (patch) | |
tree | 7555f2df23c72b1b6eea47aab5542be24742f94c /mysql-test/r/select_found.result | |
parent | 1fa1ea0f2df62796a89df8f00f49a4e77d7cf478 (diff) | |
download | mariadb-git-9418bd9c2167ef6a75d7d1bfaaf5e2cf94d09bae.tar.gz |
MDEV-5898 FOUND_ROWS() return incorrect value when using DISTINCT
revert the fix for MDEV-5549, use a different approach.
Diffstat (limited to 'mysql-test/r/select_found.result')
-rw-r--r-- | mysql-test/r/select_found.result | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index ee6d309f005..07c7b7939af 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -291,3 +291,36 @@ select found_rows(); found_rows() 1 drop table t1, t2; +create table t1 ( +a1 int auto_increment primary key, +b1 datetime, +c1 int +); +insert t1 (a1) values (null); +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +insert t1 (a1) select null from t1; +update t1 set c1=a1 % 2; +create table t2 ( +a2 int, +b2 int, +c2 char(16) default '', +primary key (a2, b2) +); +insert t2 select a1, 1, 'ok' from t1; +insert t2 select a1, 2, 'ko' from t1; +insert t2 select a1, 3, 'ko' from t1; +insert t2 select a1, 4, 'ok' from t1; +insert t2 select a1, 5, 'ok' from t1; +select sql_calc_found_rows distinct a1,b1,c2 from t1 join t2 on a2=a1 +where a1 <= 256 and c1=0 and c2='ok' order by b1 desc, a1 desc limit 46; +select found_rows(); +found_rows() +128 +drop table t1, t2; |