Opened 15 years ago

Last modified 11 years ago

#11998 closed

IntegerField not validated for overflow — at Initial Version

Reported by: francis.giraldeau@… Owned by: nobody
Component: Database layer (models, ORM) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Let be this small model :

class IntegerOverflowTest(models.Model):

someint = models.IntegerField()

For mysql, maximum values for signed integer is 2147483647 [1]

In admin interface, defining a value more than the maximum raises this exception :

Warning : Out of range value for column 'someint' at row 1

I would have expected that the form to be validated and prompt the error gracefully.

[1] http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

Change History (0)

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