Commit 92c28055 authored by unknown's avatar unknown

fixed problem with UNION flags


sql/sql_lex.h:
  removed unused flag
sql/sql_union.cc:
  correct flag used
parent fab5bf35
......@@ -296,7 +296,7 @@ protected:
select_result *result;
int res;
ulong describe, found_rows_for_union;
ulong found_rows_for_union;
bool prepared, // prepare phase already performed for UNION (unit)
optimized, // optimize phase already performed for UNION (unit)
executed, // already executed
......
......@@ -377,11 +377,12 @@ int st_select_lex_unit::exec()
offset_limit_cnt= global_parameters->offset_limit;
select_limit_cnt= global_parameters->select_limit +
global_parameters->offset_limit;
if (select_limit_cnt < global_parameters->select_limit)
select_limit_cnt= HA_POS_ERROR; // no limit
if (select_limit_cnt == HA_POS_ERROR)
options&= ~OPTION_FOUND_ROWS;
else if (found_rows_for_union && !describe)
else if (found_rows_for_union && !thd->lex.describe)
options|= OPTION_FOUND_ROWS;
fake_select_lex->ftfunc_list= &empty_list;
fake_select_lex->table_list.link_in_list((byte *)&result_table_list,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment