1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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.
This commit is contained in:
konstantin@mysql.com
2005-05-30 20:54:37 +04:00
parent 248a6934bb
commit 2d6a70c42a
17 changed files with 69 additions and 104 deletions

View File

@ -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;