Commit c58b8afa authored by unknown's avatar unknown

after review fix(CRUM)

after merge fix


sql/item.cc:
  after merge fix
sql/item_cmpfunc.cc:
  after review fix
sql/item_cmpfunc.h:
  after review fix
parent 5fe662e2
...@@ -497,15 +497,13 @@ bool Item_asterisk_remover::fix_fields(THD *thd, ...@@ -497,15 +497,13 @@ bool Item_asterisk_remover::fix_fields(THD *thd,
thd->fatal_error= 1; // can't create Item => out of memory thd->fatal_error= 1; // can't create Item => out of memory
} }
else else
my_message(ER_SUBSELECT_NO_1_COL, ER(ER_SUBSELECT_NO_1_COL), my_error(ER_CARDINALITY_COL, MYF(0), 1);
MYF(0));
} }
else else
my_error(ER_BAD_TABLE_ERROR, MYF(0), fitem->table_name); my_error(ER_BAD_TABLE_ERROR, MYF(0), fitem->table_name);
} }
else else
my_message(ER_SUBSELECT_NO_1_COL, ER(ER_SUBSELECT_NO_1_COL), my_error(ER_CARDINALITY_COL, MYF(0), 1);
MYF(0));
else else
my_error(ER_NO_TABLES_USED, MYF(0)); my_error(ER_NO_TABLES_USED, MYF(0));
} }
......
...@@ -129,7 +129,8 @@ void Item_bool_func2::fix_length_and_dec() ...@@ -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) int Arg_comparator::set_compare_func(Item_bool_func2 *item, Item_result type)
{ {
owner= item; owner= item;
func= comparator_matrix[type][owner->equal]; func= comparator_matrix[type][(owner->functype() == Item_func::EQUAL_FUNC)?
1:0];
if (type == ROW_RESULT) if (type == ROW_RESULT)
{ {
uint n= args[0]->cols(); uint n= args[0]->cols();
......
...@@ -34,9 +34,8 @@ class Item_bool_func2 :public Item_int_func ...@@ -34,9 +34,8 @@ class Item_bool_func2 :public Item_int_func
{ /* Bool with 2 string args */ { /* Bool with 2 string args */
protected: protected:
String tmp_value1,tmp_value2; String tmp_value1,tmp_value2;
bool equal;
public: 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 fix_length_and_dec();
void set_cmp_func() void set_cmp_func()
{ {
...@@ -89,7 +88,7 @@ public: ...@@ -89,7 +88,7 @@ public:
class Item_func_equal :public Item_bool_rowready_func2 class Item_func_equal :public Item_bool_rowready_func2
{ {
public: 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(); longlong val_int();
void fix_length_and_dec(); void fix_length_and_dec();
enum Functype functype() const { return EQUAL_FUNC; } enum Functype functype() const { return EQUAL_FUNC; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment