[Typo3] duplicate entry

Martin Poelstra martin at beryllium.net
Wed Apr 27 17:48:32 CEST 2005


Hi Mathias and Ben,

> > Duplicate entry '147531' for key 1

> this is a basic mysql error which results from the following scenario:
> mysql wants to write an autoincrement value into a table which has more 
> entries than the maximum values allowed by the field type.

That's not the only reason. From the MySQL docs:

"Normally, an error occurs when you try to INSERT or UPDATE a row that 
causes a primary key, unique key, or foreign key violation."

So, it could also happen for other things than auto-increment-columns (like 
it did with the indexed_search on our site).

Also, "147531" (the value Ben reported) doesn't seem to be some kind of 
limit to me.
I'd try to turn the debug-function of $TYPO3_DB on, and see which query is 
producing the error...

Grtz,
Martin

----- Original Message ----- 
From: "Mathias Schreiber [wmdb]" <mathias.schreiber at wmdb.de>
Newsgroups: typo3.english
To: <typo3-english at lists.netfielders.de>
Sent: Wednesday, April 27, 2005 4:17 PM
Subject: Re: [Typo3] duplicate entry


> Peter Russ wrote:
>> Any extension on this page used? which tables involved?
>
> guys...
>
> this is a basic mysql error which results from the following scenario:
> mysql wants to write an autoincrement value into a table which has more 
> entries than the maximum values allowed by the field type.
> We once got that from sys_stat where an unsigned integer wasn't enough.
> changing to bigint is an option.
> Otherwise truncate the table and reset the autoincrement counter.
> We once had this for the table tt_content ;-)
>
> -- 
> No Subject - No Realname - No Service!
> Respect the List/Newsgroup Rules!
>  >> http://typo3.org/1438.0.html <<
> --------------------------------------
> if ($GLOBALS['TSFE']->feuser->data['ahnung'] == 0) {
> $this->fresseHalten = 1;
> }
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 




More information about the TYPO3-english mailing list