1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
(Bug#3738: SQL_CALC_FOUND_ROWS ignores WHERE if LIMIT used,
 Bug#3845: wrong FOUND_ROWS result)
This commit is contained in:
unknown
2004-05-28 15:01:16 +05:00
parent a4237f3dd9
commit 0cb0e7f5b9
3 changed files with 40 additions and 2 deletions

View File

@ -5348,7 +5348,8 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
if ((join->tables == 1) && !join->tmp_table && !join->sort_and_group
&& !join->send_group_parts && !join->having && !jt->select_cond &&
!(jt->select && jt->select->quick) &&
!(jt->table->file->table_flags() & HA_NOT_EXACT_COUNT))
!(jt->table->file->table_flags() & HA_NOT_EXACT_COUNT) &&
(jt->ref.key < 0))
{
/* Join over all rows in table; Return number of found rows */
TABLE *table=jt->table;
@ -5429,7 +5430,8 @@ end_send_group(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
DBUG_RETURN(-1); /* purecov: inspected */
if (end_of_records)
{
join->send_records++;
if (!error)
join->send_records++;
DBUG_RETURN(0);
}
if (!error &&