summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-11-19 19:45:03 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2002-11-19 19:45:03 +0200
commitecc59f6adc4ac7456e1e7bb721755beef0b01510 (patch)
treec427155c4d08779b3d3eaef7d24cee213edc0943
parent888424a13a5c4d924c3ae17bc401a2a2c1c089e7 (diff)
parente96234aa6bc24fa5f82d323f9f348c404916edc4 (diff)
downloadmariadb-git-ecc59f6adc4ac7456e1e7bb721755beef0b01510.tar.gz
Merge sinisa@work.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
-rw-r--r--mysql-test/r/select_found.result5
-rw-r--r--mysql-test/t/select_found.test2
-rw-r--r--sql/sql_select.cc2
3 files changed, 8 insertions, 1 deletions
diff --git a/mysql-test/r/select_found.result b/mysql-test/r/select_found.result
index a48e1e16d37..8500e244d08 100644
--- a/mysql-test/r/select_found.result
+++ b/mysql-test/r/select_found.result
@@ -183,4 +183,9 @@ titre numeropost maxnumrep
SELECT FOUND_ROWS();
FOUND_ROWS()
3
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 ORDER BY numeropost LIMIT 0;
+titre numeropost maxnumrep
+SELECT FOUND_ROWS();
+FOUND_ROWS()
+3
drop table t1;
diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test
index b380c86d2db..316e7894344 100644
--- a/mysql-test/t/select_found.test
+++ b/mysql-test/t/select_found.test
@@ -90,4 +90,6 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 WHERE numeropost > 1 LIMIT 0;
SELECT FOUND_ROWS();
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0;
SELECT FOUND_ROWS();
+SELECT SQL_CALC_FOUND_ROWS * FROM t1 ORDER BY numeropost LIMIT 0;
+SELECT FOUND_ROWS();
drop table t1;
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index b596d27b5af..05551980309 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -324,7 +324,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
this->group= group_list != 0;
row_limit= ((select_distinct || order || group_list) ? HA_POS_ERROR :
unit->select_limit_cnt);
- do_send_rows = (row_limit) ? 1 : 0;
+ do_send_rows = (unit->select_limit_cnt) ? 1 : 0;
this->unit= unit;
#ifdef RESTRICTED_GROUP