summaryrefslogtreecommitdiff
path: root/sql/field.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/field.cc')
-rw-r--r--sql/field.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 36f9fd5ee36..141a7354433 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -4738,7 +4738,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)
{
THD *thd= get_thd();
ErrConvDouble err(j);