#13666: Updates with F objects on decimal fields raise MySQL warnings
-------------------------------------+-------------------------------------
Reporter: KyleMac | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.7
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by halfnibble):
* cc: josh@… (added)
* version: 1.2 => 1.7
Comment:
The Django ORM definitely needs to use CAST with MySQL. Otherwise, this
bug may manifest randomly on various architectures.
Read this on MySQL Type Conversion:
''"""Furthermore, the conversion from string to floating-point and from
integer to floating-point do not necessarily occur the same way. The
integer may be converted to floating-point by the CPU, whereas the string
is converted digit by digit in an operation that involves floating-point
multiplications.
''The results shown will vary on different systems, and can be affected by
factors such as computer architecture or the compiler version or
optimization level. One way to avoid such problems is to use CAST() so
that a value is not converted implicitly to a float-point number:"""''''
[http://dev.mysql.com/doc/refman/5.6/en/type-conversion.html]
--
Ticket URL: <https://code.djangoproject.com/ticket/13666#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.d7f1d604fb7348ba85f09c8ae8e1fbc1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.