diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc index 072a7e5878f..9a9b8fe26a8 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -101,6 +101,14 @@ void Item::print_item_w_name(String *str) } +Item_ident::Item_ident(const char *db_name_par,const char *table_name_par, + const char *field_name_par) + :db_name(db_name_par),table_name(table_name_par),field_name(field_name_par), + depended_from(0) +{ + name = (char*) field_name_par; +} + // Constructor used by Item_field & Item_ref (see Item comment) Item_ident::Item_ident(THD *thd, Item_ident &item): Item(thd, item), @@ -1734,12 +1742,11 @@ Item_result item_cmp_type(Item_result a,Item_result b) { if (a == STRING_RESULT && b == STRING_RESULT) return STRING_RESULT; - else if (a == INT_RESULT && b == INT_RESULT) + if (a == INT_RESULT && b == INT_RESULT) return INT_RESULT; else if (a == ROW_RESULT || b == ROW_RESULT) return ROW_RESULT; - else - return REAL_RESULT; + return REAL_RESULT; } |