diff options
author | unknown <bell@sanja.is.com.ua> | 2004-05-05 21:24:13 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-05-05 21:24:13 +0300 |
commit | 2c95f97c2beea7b88378623d9655fcf2ad88a9a9 (patch) | |
tree | b08dcc78213fe6542cd07701d30fdab61f2ac232 /sql/sql_union.cc | |
parent | b30d0883b1e87df5a476a9e48542321de4384aa4 (diff) | |
parent | f6428e8bb9ac0cad24465513c5969a50cd13f6f2 (diff) | |
download | mariadb-git-2c95f97c2beea7b88378623d9655fcf2ad88a9a9.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-ndb-4.1
mysql-test/r/subselect.result:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 0dcf9f4731b..84468313b4f 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -376,21 +376,12 @@ int st_select_lex_unit::exec() if (!thd->is_fatal_error) // Check if EOM { ulong options_tmp= thd->options; - /* - We have to take into the account a case when: - SET SQL_SELECT_LIMIT was set. - In mysql_new_select() function this value was copied to - the fake_select_lex node of the top-level unit. - Here below, we just take this value if global LIMIT was not applied - to the entire UNION. - */ - ha_rows select_limit= ((global_parameters->select_limit != HA_POS_ERROR) ? - global_parameters->select_limit : fake_select_lex->select_limit); thd->lex->current_select= fake_select_lex; offset_limit_cnt= global_parameters->offset_limit; - select_limit_cnt= select_limit + global_parameters->offset_limit; + select_limit_cnt= global_parameters->select_limit + + global_parameters->offset_limit; - if (select_limit_cnt < select_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_tmp&= ~OPTION_FOUND_ROWS; |