Re: [MySQL] FAKE DUPLICATE ROW
| From: | Richard Davey | Date: | Fri, 20 Feb 2004 13:40:02 +0000 |
| Subject: | Re: [MySQL] FAKE DUPLICATE ROW | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178346@lists.php.net to get a copy of this message | ||
Hello Alessandro,
Friday, February 20, 2004, 1:31:02 PM, you wrote:
AV>
code int(20) default NULL,
AV> so that seems that mysql has created a completely wrong key for this row!
AV> my question is: is there a limit for the integer part of the index, or a bug
AV> any suggestion would be very much appreciated.
The maximum value an INT field can hold is 4,294,967,295 on an
UNSIGNED field - you have not declared your code field as unsigned
which means you have halved this maximum value (because it must cope
with the minus values as well) - so consequently your 3,726,227,013
value is simply too big for it.
Change to a BIGINT or make the field unsigned.
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html