mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
CASE stores first_expr and else_expr in args[] array now.
This allowed to reuse a lot of code.
This commit is contained in:
@ -102,10 +102,9 @@ eval_const_cond(COND *cond)
|
||||
return ((Item_func*) cond)->val_int() ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
Item_func::Item_func(List<Item> &list)
|
||||
:allowed_arg_cols(1)
|
||||
void Item_func::set_arguments(List<Item> &list)
|
||||
{
|
||||
allowed_arg_cols= 1;
|
||||
arg_count=list.elements;
|
||||
if ((args=(Item**) sql_alloc(sizeof(Item*)*arg_count)))
|
||||
{
|
||||
@ -122,6 +121,12 @@ Item_func::Item_func(List<Item> &list)
|
||||
list.empty(); // Fields are used
|
||||
}
|
||||
|
||||
Item_func::Item_func(List<Item> &list)
|
||||
:allowed_arg_cols(1)
|
||||
{
|
||||
set_arguments(list);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Resolve references to table column for a function and it's argument
|
||||
|
Reference in New Issue
Block a user