BIGINT range check only working for string conversions

Bug #685803 reported by Andrew Hutchings on 2010-12-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Andrew Hutchings
Andrew Hutchings

Bug Description

When inserting into a bigint column, vaues > max bigint (64bit signed max) are accepted, but when the values are in quotes an out of range error is hit. I would expect out of range for both instances:

drizzle> create table t6 (a bigint);
Query OK, 0 rows affected (0.07 sec)

drizzle> INSERT INTO `t6` VALUES (9223372036854775807),(18446744073709551615);
Query OK, 2 rows affected (0.08 sec)
Records: 2 Duplicates: 0 Warnings: 0

drizzle> INSERT INTO `t6` VALUES ('9223372036854775807'),('18446744073709551615');
ERROR 1264 (22003): Out of range value for column 'a' at row 2

drizzle> select * from t6\G
*************************** 1. row ***************************
a: 9223372036854775807
*************************** 2. row ***************************
a: -1
2 rows in set (0 sec)

Related branches

Lee Bieber (kalebral) on 2010-12-10
Changed in drizzle:
importance: Undecided → Medium
Changed in drizzle:
assignee: nobody → Andrew Hutchings (linuxjedi)
Andrew Hutchings (linuxjedi) wrote :

This was actually fixed in 2010-12-20 release but I can't change the milestone to that one now

Lee Bieber (kalebral) wrote :

Removed the lock so that we can mark this as fixed 2010-12-20

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers