1
0
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:
unknown
2003-08-27 19:11:54 -04:00
parent 6496a0dd14
commit a73058a77c
7 changed files with 202 additions and 0 deletions

View File

@ -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);
};