diff options
author | bell@sanja.is.com.ua <> | 2002-12-04 11:01:48 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-12-04 11:01:48 +0200 |
commit | ed8cc2a844738386ae3eef3b3b01c0e784a0b3f6 (patch) | |
tree | 40977dbd62ed88cc2fe9f943ed931dd3e524ebe7 /sql/item_func.h | |
parent | 91bd1e4cc5ea197c5e61ff868f17958cd7fdf0e2 (diff) | |
download | mariadb-git-ed8cc2a844738386ae3eef3b3b01c0e784a0b3f6.tar.gz |
changing in Item_row according last review (SCRUM)
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 44 |
1 files changed, 3 insertions, 41 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 67c088f2bd9..faed8d5f4be 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -28,48 +28,10 @@ extern "C" /* Bug in BSDI include file */ } #endif -extern Item_result item_cmp_type(Item_result a,Item_result b); -class Item_bool_func2; -class Arg_comparator; - -typedef int (Arg_comparator::*arg_cmp_func)(); - -class Arg_comparator: public Sql_alloc -{ - Item *args[2]; - arg_cmp_func func; - Item_bool_func2 *owner; - Arg_comparator *comparators; // used only for compare_row() - -public: - inline void set_arg(int i, Item *item) { args[i]= item; } - int set_compare_func(Item_bool_func2 *owner, Item_result type); - inline int set_compare_func(Item_bool_func2 *owner) - { - return set_compare_func(owner, item_cmp_type(args[0]->result_type(), - args[1]->result_type())); - } - inline int compare() { return (this->*func)(); } - - int compare_string(); // compare args[0] & args[1] - int compare_real(); // compare args[0] & args[1] - int compare_int(); // compare args[0] & args[1] - int compare_row(); // compare args[0] & args[1] - int compare_e_string(); // compare args[0] & args[1] - int compare_e_real(); // compare args[0] & args[1] - int compare_e_int(); // compare args[0] & args[1] - int compare_e_row(); // compare args[0] & args[1] - - static arg_cmp_func comparator_matrix [4][2]; - - friend class Item_func; -}; - class Item_func :public Item_result_field { protected: - Item **args; - Arg_comparator arg_store; + Item **args, *tmp_arg[2]; uint allowed_arg_cols; public: uint arg_count; @@ -96,14 +58,14 @@ public: Item_func(Item *a): allowed_arg_cols(1), arg_count(1) { - args= arg_store.args; + args= tmp_arg; args[0]= a; with_sum_func= a->with_sum_func; } Item_func(Item *a,Item *b): allowed_arg_cols(1), arg_count(2) { - args= arg_store.args; + args= tmp_arg; args[0]= a; args[1]= b; with_sum_func= a->with_sum_func || b->with_sum_func; } |