diff options
author | monty@mysql.com <> | 2003-11-20 22:30:48 +0200 |
---|---|---|
committer | monty@mysql.com <> | 2003-11-20 22:30:48 +0200 |
commit | b01fcb4e1438dcc1f9a31bcab30b98b578d1704a (patch) | |
tree | 47f72b790e762b88773ac94032106a9fec3ee4a4 /sql/item.cc | |
parent | 55e07608fd7bcb47bd92f744a07b7631aa91d9c6 (diff) | |
parent | dd287a4cdf4b8937ce428678fa096134a5ae8a88 (diff) | |
download | mariadb-git-b01fcb4e1438dcc1f9a31bcab30b98b578d1704a.tar.gz |
Merge with 4.0 to get:
Fix for storing negative values in decimal fields
Fix for FLUSH TABLE with HANDLER
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc index f41cb720f12..d5401b85755 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1190,6 +1190,21 @@ int Item_string::save_in_field(Field *field, bool no_conversions) -1 : 0; } +int Item_uint::save_in_field(Field *field, bool no_conversions) +{ + longlong nr= val_int(); + int res; + + if (null_value) + return set_field_to_null(field); + field->set_notnull(); + if (nr < 0) + res= field->store(ulonglong2double(nr); + else + res= field->store(nr); + return res ? -1 : 0; +} + int Item_int::save_in_field(Field *field, bool no_conversions) { |