summaryrefslogtreecommitdiff
path: root/mysql-test/r/select_found.result
diff options
context:
space:
mode:
authorram@gw.mysql.r18.ru <>2004-05-28 15:01:16 +0500
committerram@gw.mysql.r18.ru <>2004-05-28 15:01:16 +0500
commit605962a9384912cf665ae33b105326abd5f6a486 (patch)
tree5f48561d37d69ca50e34a1c86a86666f1d7f4fa8 /mysql-test/r/select_found.result
parentc939f42fa58e98102312e0c43fdaa15863042423 (diff)
downloadmariadb-git-605962a9384912cf665ae33b105326abd5f6a486.tar.gz
a fix.
(Bug#3738: SQL_CALC_FOUND_ROWS ignores WHERE if LIMIT used, Bug#3845: wrong FOUND_ROWS result)
Diffstat (limited to 'mysql-test/r/select_found.result')
-rw-r--r--mysql-test/r/select_found.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result
index 367bdd798b4..444124bcd67 100644
--- a/mysql-test/r/select_found.result
+++ b/mysql-test/r/select_found.result
@@ -206,3 +206,20 @@ WHERE ( r = 1 AND a IN ( 1, 2 ) AND ( u = 'w' OR u LIKE 'w/%' ) )
OR ( r = 1 AND a IN ( 3 ) AND ( u = 'w/U' OR u LIKE 'w/U/%' ) )
OR ( r = 1 AND a IN ( 1, 2, 3 ) AND ( u = 'w' ) );
drop table t1;
+CREATE TABLE t1 (a VARCHAR(16), UNIQUE(a));
+INSERT INTO t1 VALUES ('1'), ('2'), ('3');
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a = '2' LIMIT 0, 1;
+a
+2
+SELECT FOUND_ROWS();
+FOUND_ROWS()
+1
+DROP TABLE t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (0), (0), (1), (2);
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE a = 0 GROUP BY a HAVING a > 10;
+a
+SELECT FOUND_ROWS();
+FOUND_ROWS()
+0
+DROP TABLE t1;