MySQL 5.0.3+ and meta.FloatFields don't mix
|Reported by:||ben@…||Owned by:||adrian|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Before MySQL 5.0.3, decimal types were stored unpacked, and behaved like chars; later versions store them as packed, fixed point numbers. More details here. This makes Python's formatting unhappy and a TypeError: Float argument required is raised.
- result_repr = ('%%.%sf' % f.decimal_places) % field_val + result_repr = ('%%.%sf' % f.decimal_places) % float(field_val)
This isn't a data loss bug or anything, but I'm sure it's irritating to anyone using recent MySQL versions.