July 14th, 2000, 01:53 PM
I have a table where I place a large integer: for example: 200007014134747 Now it looks algood, until 24hours plus, when I check it it is listed at some -1003045025 (number varies but always this length of digits. I have checked and nothing external is changing this field. Is their some bug in MySQL which I am unaware?
July 15th, 2000, 10:51 AM
What's the column type that you are storing the integer in?
July 15th, 2000, 09:39 PM
You may not have declared your column type properly.
Declare it as BIGINT 10 UNSIGNED
You M wasn't big enough or too big for mySQLL
or more probably you declared it as signed with not enough digits and the next time you called it up, mySQL converted it to its modulo value for the number of digits you specified
M is the number of digits
BIGINT[(M)] [UNSIGNED] [ZEROFILL]
A large integer. The signed range is -9223372036854775808 to 9223372036854775807.
The unsigned range is 0 to 18446744073709551615. Note that all arithmetic is done using
signed BIGINT or DOUBLE values, so you shouldn't use unsigned big integers larger than
9223372036854775807 (63 bits) except with bit functions! Note that -, + and * will use
BIGINT arithmetic when both arguments are INTEGER values! This means that if you multiply
two big integers (or results from functions that return integers) you may get unexpected results
if the result is larger than 9223372036854775807.
July 17th, 2000, 10:21 AM
I set the field for bigint(20), I did not specify signed or unsigned, though my number is fixed length at 14-digits (i.e. 20000717101812).