1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix set_limit to be uniform with all calls.

Fix of set_limit in case of an error (actually impossible case but better it will be right)
This commit is contained in:
unknown
2012-02-10 16:23:18 +02:00
parent 6e9b06d90b
commit 804c69ab83
2 changed files with 3 additions and 3 deletions

View File

@ -750,7 +750,7 @@ bool mysql_derived_optimize(THD *thd, LEX *lex, TABLE_LIST *derived)
if (!derived->is_merged_derived())
{
JOIN *join= first_select->join;
unit->set_limit(first_select);
unit->set_limit(unit->global_parameters);
unit->optimized= TRUE;
if ((res= join->optimize()))
goto err;
@ -865,7 +865,7 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
}
else
{
unit->set_limit(first_select);
unit->set_limit(unit->global_parameters);
if (unit->select_limit_cnt == HA_POS_ERROR)
first_select->options&= ~OPTION_FOUND_ROWS;