diff options
author | Igor Babaev <igor@askmonty.org> | 2009-11-09 18:32:39 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2009-11-09 18:32:39 -0800 |
commit | d749c7e60061fd328e95f74d2d77fc59312da3b1 (patch) | |
tree | 152399c01e2cfe90637108d45146c48d9f4d6904 /sql/field.h | |
parent | 90a4a3dcd7049b65ba59c57bdb434cd8b9b3b823 (diff) | |
parent | 9b7a0fddbea952372adc04b1c098411b19cb173b (diff) | |
download | mariadb-git-d749c7e60061fd328e95f74d2d77fc59312da3b1.tar.gz |
Merge
Diffstat (limited to 'sql/field.h')
-rw-r--r-- | sql/field.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h index 4f1f62ba405..b597da93c3c 100644 --- a/sql/field.h +++ b/sql/field.h @@ -695,6 +695,10 @@ protected: class Field_num :public Field { public: + /** + The scale of the Field's value, i.e. the number of digits to the right + of the decimal point. + */ const uint8 dec; bool zerofill,unsigned_flag; // Purify cannot handle bit fields Field_num(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg, @@ -853,6 +857,11 @@ public: Field_new_decimal(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg, uint8 dec_arg, bool unsigned_arg); + /* + Create a field to hold a decimal value from an item. + Truncates the precision and/or scale if necessary. + */ + static Field_new_decimal *new_decimal_field(const Item *item); enum_field_types type() const { return MYSQL_TYPE_NEWDECIMAL;} enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; } Item_result result_type () const { return DECIMAL_RESULT; } |