diff options
author | unknown <tsmith@siva.hindu.god> | 2007-05-17 14:17:50 -0600 |
---|---|---|
committer | unknown <tsmith@siva.hindu.god> | 2007-05-17 14:17:50 -0600 |
commit | ce5f0d1bc3ced3ea987d5fcb2f64204cb5c17661 (patch) | |
tree | e1f124ea0e96bfa5ff03cb4885b9f2dde79eb0d4 /sql/item_func.h | |
parent | db18dc9da096bdd0adf5d8b89896d6b041ee7f30 (diff) | |
parent | 75392f37078a8e3bf3098f40c84a24c18cd91d5b (diff) | |
download | mariadb-git-ce5f0d1bc3ced3ea987d5fcb2f64204cb5c17661.tar.gz |
Merge siva.hindu.god:/home/tsmith/m/bk/50
into siva.hindu.god:/home/tsmith/m/bk/maint/50
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/outfile.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
Diffstat (limited to 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index c8c3ad80714..1cffe9a934e 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -331,8 +331,8 @@ class Item_decimal_typecast :public Item_func public: Item_decimal_typecast(Item *a, int len, int dec) :Item_func(a) { - max_length= len + 2; decimals= dec; + max_length= my_decimal_precision_to_length(len, dec, unsigned_flag); } String *val_str(String *str); double val_real(); @@ -687,15 +687,24 @@ class Item_func_min_max :public Item_func Item_result cmp_type; String tmp_value; int cmp_sign; + /* TRUE <=> arguments should be compared in the DATETIME context. */ + bool compare_as_dates; + /* An item used for issuing warnings while string to DATETIME conversion. */ + Item *datetime_item; + THD *thd; + public: Item_func_min_max(List<Item> &list,int cmp_sign_arg) :Item_func(list), - cmp_type(INT_RESULT), cmp_sign(cmp_sign_arg) {} + cmp_type(INT_RESULT), cmp_sign(cmp_sign_arg), compare_as_dates(FALSE), + datetime_item(0) {} double val_real(); longlong val_int(); String *val_str(String *); my_decimal *val_decimal(my_decimal *); void fix_length_and_dec(); enum Item_result result_type () const { return cmp_type; } + bool result_as_longlong() { return compare_as_dates; }; + uint cmp_datetimes(ulonglong *value); }; class Item_func_min :public Item_func_min_max |