Product : MySql
Version : 3.23.45
Error   : Invalid duplicate key error for large
numeric primary key's

Description
-------------------------------------------
When a large numeric primary key is created

      ID     NUMERIC(38)
      PRIMARY KEY (ID)

And you insert two records with different Id's

ID1=  170000000000000000001
ID2=  170000000000000000002

You get an error 1062 : Duplicate Key

Diagnosis
-------------------------------------------
I noticed that this problem only happens when you
insert keys greater than 19 chars which is around the
maximum size of a long.  I thought it might be
possible that the key comparison was being done using
a field that was not large enough to handle the data
for that column.

Michael Connor



__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to