diff options
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc index a3c20ec18f2..f4aaaca69d6 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4399,7 +4399,14 @@ longlong Field_double::val_int_from_real(bool want_unsigned_result) float8get(j,ptr); res= double_to_longlong(j, want_unsigned_result, &error); - if (error) + /* + Note, val_uint() is currently used for auto_increment purposes only, + and we want to suppress all warnings in such cases. + If we ever start using val_uint() for other purposes, + val_int_from_real() will need a new separate parameter to + suppress warnings. + */ + if (error && !want_unsigned_result) { ErrConvDouble err(j); push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN, |