summaryrefslogtreecommitdiff
path: root/mysql-test/r/group_min_max.result
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2008-08-28 12:54:50 +0300
committerGeorgi Kodinov <kgeorge@mysql.com>2008-08-28 12:54:50 +0300
commit8b0e99fe26db6c41ae4bdddd31777e1f63638efe (patch)
tree458167977d24af9a6e787029172c907cc01999f3 /mysql-test/r/group_min_max.result
parentaea2ff7064bf7739252ca2132ab8c3eb5cf6957c (diff)
parent31d76e8d526da59070f0c75cae0b9672c11a1b03 (diff)
downloadmariadb-git-8b0e99fe26db6c41ae4bdddd31777e1f63638efe.tar.gz
merge 5.0-bugteam -> 5.1-bugteam
Diffstat (limited to 'mysql-test/r/group_min_max.result')
-rw-r--r--mysql-test/r/group_min_max.result76
1 files changed, 76 insertions, 0 deletions
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index bdc8d586f4e..adda0053687 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -2372,3 +2372,79 @@ a MIN(b) MAX(b) AVG(b)
2 1 3 2.0000
1 1 3 2.0000
DROP TABLE t1;
+create table t1 (a int, b int, primary key (a,b), key `index` (a,b)) engine=MyISAM;
+insert into t1 (a,b) values
+(0,0),(0,1),(0,2),(0,3),(0,4),(0,5),(0,6),
+(0,7),(0,8),(0,9),(0,10),(0,11),(0,12),(0,13),
+(1,0),(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),
+(1,7),(1,8),(1,9),(1,10),(1,11),(1,12),(1,13),
+(2,0),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),
+(2,7),(2,8),(2,9),(2,10),(2,11),(2,12),(2,13),
+(3,0),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),
+(3,7),(3,8),(3,9),(3,10),(3,11),(3,12),(3,13);
+insert into t1 (a,b) select a, max(b)+1 from t1 where a = 0 group by a;
+select * from t1;
+a b
+0 0
+0 1
+0 2
+0 3
+0 4
+0 5
+0 6
+0 7
+0 8
+0 9
+0 10
+0 11
+0 12
+0 13
+0 14
+1 0
+1 1
+1 2
+1 3
+1 4
+1 5
+1 6
+1 7
+1 8
+1 9
+1 10
+1 11
+1 12
+1 13
+2 0
+2 1
+2 2
+2 3
+2 4
+2 5
+2 6
+2 7
+2 8
+2 9
+2 10
+2 11
+2 12
+2 13
+3 0
+3 1
+3 2
+3 3
+3 4
+3 5
+3 6
+3 7
+3 8
+3 9
+3 10
+3 11
+3 12
+3 13
+explain extended select sql_buffer_result a, max(b)+1 from t1 where a = 0 group by a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY,index PRIMARY 4 NULL 3 100.00 Using where; Using index for group-by; Using temporary
+Warnings:
+Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,(max(`test`.`t1`.`b`) + 1) AS `max(b)+1` from `test`.`t1` where (`test`.`t1`.`a` = 0) group by `test`.`t1`.`a`
+drop table t1;