1
0
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:
unknown
2003-07-17 16:07:56 +05:00
parent 85cc122794
commit d5a6d17707
4 changed files with 46 additions and 108 deletions

View File

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