1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

fixed proccesing global LIMIT in last SELECT of UNION

This commit is contained in:
bell@sanja.is.com.ua
2003-09-14 22:12:55 +03:00
parent 6d62d31049
commit ea187cfd42
5 changed files with 32 additions and 14 deletions

View File

@@ -1723,6 +1723,10 @@ mysql_execute_command(THD *thd)
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);