From 65e27f604f5c4dbf8303055d145015228b1b0f8c Mon Sep 17 00:00:00 2001 From: "bell@sanja.is.com.ua" <> Date: Thu, 28 Nov 2002 20:58:23 +0200 Subject: [PATCH] after review fix(CRUM) after merge fix --- sql/item.cc | 6 ++---- sql/item_cmpfunc.cc | 3 ++- sql/item_cmpfunc.h | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index b6acaa9618a..603e3a57ce0 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -497,15 +497,13 @@ bool Item_asterisk_remover::fix_fields(THD *thd, thd->fatal_error= 1; // can't create Item => out of memory } else - my_message(ER_SUBSELECT_NO_1_COL, ER(ER_SUBSELECT_NO_1_COL), - MYF(0)); + my_error(ER_CARDINALITY_COL, MYF(0), 1); } else my_error(ER_BAD_TABLE_ERROR, MYF(0), fitem->table_name); } else - my_message(ER_SUBSELECT_NO_1_COL, ER(ER_SUBSELECT_NO_1_COL), - MYF(0)); + my_error(ER_CARDINALITY_COL, MYF(0), 1); else my_error(ER_NO_TABLES_USED, MYF(0)); } diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 06dc3fca89d..146758600c0 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -129,7 +129,8 @@ void Item_bool_func2::fix_length_and_dec() int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type) { owner= item; - func= comparator_matrix[type][owner->equal]; + func= comparator_matrix[type][(owner->functype() == Item_func::EQUAL_FUNC)? + 1:0]; if (type == ROW_RESULT) { uint n= args[0]->cols(); diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index ca03d02aa77..74c9dec7ef8 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -34,9 +34,8 @@ class Item_bool_func2 :public Item_int_func { /* Bool with 2 string args */ protected: String tmp_value1,tmp_value2; - bool equal; public: - Item_bool_func2(Item *a,Item *b) :Item_int_func(a,b), equal(0) {} + Item_bool_func2(Item *a,Item *b) :Item_int_func(a,b) {} void fix_length_and_dec(); void set_cmp_func() { @@ -89,7 +88,7 @@ public: class Item_func_equal :public Item_bool_rowready_func2 { public: - Item_func_equal(Item *a,Item *b) :Item_bool_rowready_func2(a,b) { equal=1; }; + Item_func_equal(Item *a,Item *b) :Item_bool_rowready_func2(a,b) {}; longlong val_int(); void fix_length_and_dec(); enum Functype functype() const { return EQUAL_FUNC; }