1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

correct assignment of default limit (BUG#2600)

This commit is contained in:
bell@sanja.is.com.ua
2004-02-04 15:26:41 +02:00
parent 147afc0ff2
commit b61b8bf2e1
5 changed files with 36 additions and 6 deletions

View File

@ -1540,8 +1540,9 @@ void st_select_lex::print_limit(THD *thd, String *str)
if (!thd)
thd= current_thd;
if (select_limit != thd->variables.select_limit ||
select_limit != HA_POS_ERROR ||
if ((select_limit != thd->variables.select_limit &&
this == &thd->lex->select_lex) ||
(select_limit != HA_POS_ERROR && this != &thd->lex->select_lex) ||
offset_limit != 0L)
{
str->append(" limit ", 7);