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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user