First, i am really sorry about that.

my fields is quite simple.
CREATE TABLE TEST (
   A bigint(20) unsigned DEFAULT '0' NOT NULL,
   C0 bigint(20) unsigned DEFAULT '0' NOT NULL,
   C1 bigint(20) unsigned DEFAULT '0' NOT NULL,
   C2 bigint(20) unsigned DEFAULT '0' NOT NULL,
   C3 bigint(20) unsigned DEFAULT '0' NOT NULL,
   C4 bigint(20) unsigned DEFAULT '0' NOT NULL,
   C5 bigint(20) unsigned DEFAULT '0' NOT NULL,
   C6 bigint(20) unsigned DEFAULT '0' NOT NULL,
   C7 bigint(20) unsigned DEFAULT '0' NOT NULL,
   S1 bigint(20) unsigned DEFAULT '0' NOT NULL,
   S2 bigint(20) unsigned DEFAULT '0' NOT NULL,
   S3 bigint(20) unsigned DEFAULT '0' NOT NULL,
   S4 bigint(20) unsigned DEFAULT '0' NOT NULL,
   S5 bigint(20) unsigned DEFAULT '0' NOT NULL,
   S6 bigint(20) unsigned DEFAULT '0' NOT NULL,
   S7 bigint(20) unsigned DEFAULT '0' NOT NULL,
   Total bigint(20) unsigned DEFAULT '0' NOT NULL,
   sLocation smallint(5) DEFAULT '0' NOT NULL,
   dLocation smallint(5) DEFAULT '0' NOT NULL,
   FirstTime time DEFAULT '00:00:00' NOT NULL,
   LastTime time DEFAULT '00:00:00' NOT NULL,
   Times smallint(5) unsigned DEFAULT '0' NOT NULL,
   PRIMARY KEY (A),
   KEY dLocation (dLocation),
   KEY Total (Total),
   KEY Times (Times)
);

and actually what i use is bigint, it have quotes is because i try many possible reason
still can't find where the problem is, so i add quotes to test if it can 
work.........but
unfortunately it still have problem.

and the third question. yes, when problem occur. i thought this first.
but seems not ...isamchk -r, or -f even -c or -e can't find any error.
then, i try delete the table and insert again.

but it still will occur this error.

I summary my question. that is
my table use Bigint as a primary key, i insert/update this table from empty.
then after serveral rows. sometimes it will tell me Duplicate key when insert.
but i can find that row in the table by select.




----- Original Message -----
Firstly, why do you have quotes around the numbers? I thought you said it
was bigint, not a string?

Secondly, if you are going reply/repost to the list, could you please
simplify it a bit.  Provide field names, etc.  Your insert is very difficult
to figure out especially with unmatched brackets, which doesn't make sense
at all.  I'm surprised the insert even works.

Thirdly, have you tried checktable/myisamcheck?

----- Original Message -----
From: "chchen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 20, 2001 18:56
Subject: BigInt with primary key


hi all

i use mysql-3.23.32

my project need to use unsigned Bigint as a primary key.
but when i insert many rows in this table.
sometimes it will error with Duplicate such like

insert into Table
values('9231852172526977164',0,0,52056,0,0,0,0,0,52056,0,0,0,0,0,0,0,11,0,'1
84000','184000',1),'9231898557453533324',0,0,5532,0,0,0,0,0,5532,0,0,0,0,0,0
,0,11,0,'184000','184000',1),'9230422383529723532',147,0,0,0,0,0,0,0,147,0,0
,0,0,0,0,0,91,0,'184000','184000',1) query failed
Duplicate entry '9231898557453533324' for key 1

Reply via email to