1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
This commit is contained in:
bell@sanja.is.com.ua
2004-03-27 15:59:48 +02:00
7 changed files with 52 additions and 52 deletions

View File

@ -1867,18 +1867,6 @@ mysql_execute_command(THD *thd)
res=0;
break; // Error message is given
}
/*
In case of single SELECT unit->global_parameters points on first SELECT
TODO: move counters to SELECT_LEX
*/
unit->offset_limit_cnt= (ha_rows) unit->global_parameters->offset_limit;
unit->select_limit_cnt= (ha_rows) (unit->global_parameters->select_limit+
unit->global_parameters->offset_limit);
if (unit->select_limit_cnt <
(ha_rows) unit->global_parameters->select_limit)
unit->select_limit_cnt= HA_POS_ERROR; // no limit
if (unit->select_limit_cnt == HA_POS_ERROR && !select_lex->next_select())
select_lex->options&= ~OPTION_FOUND_ROWS;
if (!(res=open_and_lock_tables(thd,tables)))
{
@ -2191,11 +2179,8 @@ mysql_execute_command(THD *thd)
if (tables && check_table_access(thd, SELECT_ACL, tables,0))
goto error; // Error message is given
select_lex->options|= SELECT_NO_UNLOCK;
unit->offset_limit_cnt= select_lex->offset_limit;
unit->select_limit_cnt= select_lex->select_limit+
select_lex->offset_limit;
if (unit->select_limit_cnt < select_lex->select_limit)
unit->select_limit_cnt= HA_POS_ERROR; // No limit
unit->set_limit(select_lex->select_limit, select_lex->offset_limit,
select_lex);
if (!(res=open_and_lock_tables(thd,tables)))
{