summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-03-17 20:18:19 -0800
committerunknown <igor@rurik.mysql.com>2005-03-17 20:18:19 -0800
commitee2633a7e2d21b55d814d7f34fd47d229409e0e5 (patch)
treef90e085274bd53f24ec71c24832c0d2b68e124aa /sql
parent39a0645a8adb7b9038d7466562f2c47180e643f5 (diff)
downloadmariadb-git-ee2633a7e2d21b55d814d7f34fd47d229409e0e5.tar.gz
olap.test:
Added a test case for bug #8617. sql_select.cc: Fixed bug #8617. Queries with ROLLUP and LIMIT n returned more than n rows if SQL_CALC_FOUND_ROWS was used. sql/sql_select.cc: Fixed bug #8617. Queries with ROLLUP and LIMIT n returned more than n rows if SQL_CALC_FOUND_ROWS was used. mysql-test/t/olap.test: Added a test case for bug #8617.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 5bfe1346568..4b2484d1e06 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -9210,7 +9210,7 @@ int JOIN::rollup_send_data(uint idx)
ref_pointer_array_size);
if ((!having || having->val_int()))
{
- if (send_records < unit->select_limit_cnt &&
+ if (send_records < unit->select_limit_cnt && do_send_rows &&
result->send_data(rollup.fields[i]))
return 1;
send_records++;