diff options
author | unknown <igor@rurik.mysql.com> | 2005-01-22 02:40:27 -0800 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2005-01-22 02:40:27 -0800 |
commit | 25c2d1adb09a3dd521a110013ab03eac3e1fc01a (patch) | |
tree | 90460d8fd1c844f7b11a3d231d91cb3d16e21035 /mysql-test/r/select_found.result | |
parent | 89a24f933537f550844862d936ed57b44ec16069 (diff) | |
download | mariadb-git-25c2d1adb09a3dd521a110013ab03eac3e1fc01a.tar.gz |
select_found.result, select_found.test:
Added a test case for bug #7945.
sql_select.cc:
Fixed bug #7945. If DISTINCT is used only with constants
in a query with GROUP BY, we can apply an optimization
that set LIMIT to 1 only in the case when there is
no SQL_CALC_FOUND_ROWS.
sql/sql_select.cc:
Fixed bug #7945. If DISTINCT is used only with constants
in a query with GROUP BY, we can apply an optimization
that set LIMIT to 1 only in the case when there is
no SQL_CALC_FOUND_ROWS.
mysql-test/t/select_found.test:
Added a test case for bug #7945.
mysql-test/r/select_found.result:
Added a test case for bug #7945.
Diffstat (limited to 'mysql-test/r/select_found.result')
-rw-r--r-- | mysql-test/r/select_found.result | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result index 444124bcd67..11629addba4 100644 --- a/mysql-test/r/select_found.result +++ b/mysql-test/r/select_found.result @@ -223,3 +223,11 @@ SELECT FOUND_ROWS(); FOUND_ROWS() 0 DROP TABLE t1; +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; +a +a +SELECT FOUND_ROWS(); +FOUND_ROWS() +1 |