summaryrefslogtreecommitdiff
path: root/mysql-test/t/select_found.test
diff options
context:
space:
mode:
authorunknown <ramil@mysql.com>2005-02-28 19:59:38 +0400
committerunknown <ramil@mysql.com>2005-02-28 19:59:38 +0400
commitf9dd79c77d3690cee26aeb0949b74ac76fccdcae (patch)
tree6f12cb96c51f12a54cc4aaabfbed0b10a5a08834 /mysql-test/t/select_found.test
parent3bffc522317ad18102f8a2e5079e3242b6866dcf (diff)
parentc8b3d65ca26ff2be783115da2fb7c790dd4338e4 (diff)
downloadmariadb-git-f9dd79c77d3690cee26aeb0949b74ac76fccdcae.tar.gz
merging
mysql-test/r/ps.result: Auto merged sql/sql_class.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test/t/select_found.test')
-rw-r--r--mysql-test/t/select_found.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test
index e51dd2442b9..91879015b51 100644
--- a/mysql-test/t/select_found.test
+++ b/mysql-test/t/select_found.test
@@ -181,3 +181,13 @@ SELECT FOUND_ROWS();
SELECT SQL_CALC_FOUND_ROWS 'foo' UNION SELECT 'bar' LIMIT 0;
SELECT FOUND_ROWS();
+
+#
+# Bug #7945: group by + distinct with constant expression + limit
+#
+
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1 VALUES (1,2), (1,3), (1,4), (1,5);
+SELECT SQL_CALC_FOUND_ROWS DISTINCT 'a' FROM t1 GROUP BY b LIMIT 2;
+SELECT FOUND_ROWS();
+DROP TABLE t1;