summaryrefslogtreecommitdiff
path: root/mysql-test/r/limit.result
diff options
context:
space:
mode:
authortimour/tkatchaounov@dl145s.mysql.com <>2006-09-01 14:29:27 +0200
committertimour/tkatchaounov@dl145s.mysql.com <>2006-09-01 14:29:27 +0200
commit462c22c1ae52cc97f0a201532ecdf12d1f2cfc9c (patch)
tree4687f44ffd0ffcc55e29314e36c849b1c328a0fa /mysql-test/r/limit.result
parent30ef47a93c0736d6bbdf41e29fdd57b111c52bfe (diff)
parent02e194cea215910dedf35f5141ecf442d6ef5407 (diff)
downloadmariadb-git-462c22c1ae52cc97f0a201532ecdf12d1f2cfc9c.tar.gz
Merge timka@10.100.64.80:/home/timka/mysql/src/4.1-bug-21787
into dl145s.mysql.com:/data/tkatchaounov/5.0-bug-21787
Diffstat (limited to 'mysql-test/r/limit.result')
-rw-r--r--mysql-test/r/limit.result14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result
index 1e38f762dd1..be2776ef533 100644
--- a/mysql-test/r/limit.result
+++ b/mysql-test/r/limit.result
@@ -76,3 +76,17 @@ a
a
1
drop table t1;
+create table t1 (a int);
+insert into t1 values (1),(2),(3),(4),(5),(6),(7);
+explain select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where; Using temporary
+select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
+c
+7
+explain select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where; Using temporary
+select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
+c
+28