diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-19 16:48:28 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-12-19 16:48:28 +0200 |
commit | 8d70097c216081e8013a548bfbde156e48985816 (patch) | |
tree | 4cca4f27d804ab261db2ee996f084fb5137833df /sql/field.cc | |
parent | 079c3599711b9cbd3ce323f32cf99693cc3d5e3b (diff) | |
parent | 252e690c859b53c51c7eecf072f33dbaaa01bcdf (diff) | |
download | mariadb-git-8d70097c216081e8013a548bfbde156e48985816.tar.gz |
Merge 10.1 to 10.2
Follow-up fix to MDEV-14008: Let Field_double::val_uint() silently
return 0 on error
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc index bff936b7052..b4353e33df6 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4807,6 +4807,15 @@ double Field_double::val_real(void) } +longlong Field_double::val_int_from_real(bool want_unsigned_result) +{ + Converter_double_to_longlong conv(val_real(), want_unsigned_result); + if (!want_unsigned_result && conv.error()) + conv.push_warning(get_thd(), Field_double::val_real(), false); + return conv.result(); +} + + my_decimal *Field_real::val_decimal(my_decimal *decimal_value) { ASSERT_COLUMN_MARKED_FOR_READ; |