Opened 15 years ago

Closed 15 years ago

#11393 closed (wontfix)

query on decimal fields with long string representation of float causes exception

Reported by: rclark Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When a querying a decimal field in mysql passing a string representation of a float with more than 6000 characters, an exception occurs.

DjangoModel.objects.filter(num_field__gte="1.000000000000000000000000000000000000000000.....")

_mysql_exceptions.Warning: Truncated incorrect DOUBLE value: '1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'

As you add more characters mysql's performance seriously degrades.

Change History (1)

comment:1 by Russell Keith-Magee, 15 years ago

Resolution: wontfix
Status: newclosed

"Doctor! It hurts when I do this"
"Then stop doing that!"

Erm... yeah. Ok. Good to know, but I don't think we're going to try and fix this one. The official position on this bug is going to be "ah... don't do that".

I am, however, slightly intrigued at the kind of use case that requires 6000+ significant figure of floating point representation...

Note: See TracTickets for help on using tickets.
Back to Top