diff options
author | konstantin@mysql.com <> | 2005-05-30 20:54:37 +0400 |
---|---|---|
committer | konstantin@mysql.com <> | 2005-05-30 20:54:37 +0400 |
commit | 2d6a70c42a4c63abb3653dd1b8f3287d4adc68f8 (patch) | |
tree | ddaffe242bb9f478a3e4a88598acfcc20bfa0700 /sql/sql_lex.cc | |
parent | 248a6934bba47d225a677c2fe216b1fb3b920ac7 (diff) | |
download | mariadb-git-2d6a70c42a4c63abb3653dd1b8f3287d4adc68f8.tar.gz |
Preparatory (and the most problematic) patch for Bug#7306
"the server side preparedStatement error for LIMIT placeholder",
which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
and later steps.
After-review fixes.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 7c7939eaf60..ec98bb38762 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1369,8 +1369,6 @@ bool st_select_lex::test_limit() "LIMIT & IN/ALL/ANY/SOME subquery"); return(1); } - // We need only 1 row to determinate existence - select_limit= 1; // no sense in ORDER BY without LIMIT order_list.empty(); return(0); @@ -1553,7 +1551,7 @@ void st_select_lex::print_limit(THD *thd, String *str) item->substype() == Item_subselect::IN_SUBS || item->substype() == Item_subselect::ALL_SUBS)) { - DBUG_ASSERT(select_limit == 1L && offset_limit == 0L); + DBUG_ASSERT(!item->fixed || select_limit == 1L && offset_limit == 0L); return; } @@ -1756,11 +1754,9 @@ bool st_lex::need_correct_ident() SYNOPSIS st_select_lex_unit::set_limit() values - SELECT_LEX with initial values for counters - sl - SELECT_LEX for options set */ -void st_select_lex_unit::set_limit(SELECT_LEX *values, - SELECT_LEX *sl) +void st_select_lex_unit::set_limit(SELECT_LEX *values) { offset_limit_cnt= values->offset_limit; select_limit_cnt= values->select_limit+values->offset_limit; |