summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-08-08 15:24:47 +0300
committermonty@hundin.mysql.fi <>2002-08-08 15:24:47 +0300
commit087261482a9bbdaa3bc0e26052a719ebdb73644b (patch)
treee7f4a2013ed3d66e640f6574e62cb7e534a5d77f /mysql-test
parent8be1cdeb89ca59be790d58dc0d43993cdc4f4191 (diff)
parent3f48e0369b2e49026e9ddd4fddcee68ebe17db1e (diff)
downloadmariadb-git-087261482a9bbdaa3bc0e26052a719ebdb73644b.tar.gz
merge with 3.23.52
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/t/group_by.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 0c9197febb5..072a1830f57 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -301,3 +301,14 @@ insert into t2 values (1, '2002-06-09'),(2, '2002-06-09'),(1, '2002-06-09'),(3,
select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender;
select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender order by percentage;
drop table t1,t2;
+
+#
+# The GROUP BY returned rows in wrong order in 3.23.51
+#
+
+CREATE TABLE t1 (ID1 int, ID2 int, ID int NOT NULL AUTO_INCREMENT,PRIMARY KEY(ID
+));
+insert into t1 values (1,244,NULL),(2,243,NULL),(134,223,NULL),(185,186,NULL);
+select S.ID as xID, S.ID1 as xID1 from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2;
+select S.ID as xID, S.ID1 as xID1, repeat('*',count(distinct yS.ID)) as Level from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2 group by xID order by xID1;
+drop table t1;