mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
fixed bug #910 (right type of ifnull function)
mysql-test/r/create.result: added test for bug #910 (right type of ifnull function) mysql-test/t/create.test: added test for bug #910 (right type of ifnull function) sql/field.h: added new constructors of Field_decimal, Field_tiny, Field_short, Field_float, Field_null, Field_year for using in Item::tmp_table_field_from_field_type sql/item.cc: added Item::tmp_table_field_from_field_type sql/item.h: added Item::tmp_table_field_from_field_type
This commit is contained in:
@ -281,6 +281,8 @@ public:
|
||||
class Item_func_ifnull :public Item_func
|
||||
{
|
||||
enum Item_result cached_result_type;
|
||||
enum_field_types cached_field_type;
|
||||
bool field_type_defined;
|
||||
public:
|
||||
Item_func_ifnull(Item *a,Item *b)
|
||||
:Item_func(a,b), cached_result_type(INT_RESULT)
|
||||
@ -289,8 +291,10 @@ public:
|
||||
longlong val_int();
|
||||
String *val_str(String *str);
|
||||
enum Item_result result_type () const { return cached_result_type; }
|
||||
enum_field_types field_type() const;
|
||||
void fix_length_and_dec();
|
||||
const char *func_name() const { return "ifnull"; }
|
||||
Field *tmp_table_field(TABLE *table);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user