user warning: Duplicate entry '7530' for key 1 query: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values('Kontakt', 'contact', 'http://www.mydomain.com/', '89.103.62.159', 1, 'ieja6ffvccod0dcpqglvlt0pk1', 1025, 1248714198) in /var/www/vhosts/mydomain.com/httpdocs/modules/statistics/statistics.module on line 64.

Few days ago I noticed this warning on every page. Only the "values" part is changing. It was on D 6.12, but it is still here after upgrade to D 6.13.
I've MySQL 5.0.22 and PHP 5.1.6.

I try to clear cache, run update.php and cron, but with no avail.

Thanks for any suggestion.

Comments

andypost’s picture

Status: Active » Patch (to be ported)

Looks like accesslog autoincrement value is broken

andypost’s picture

Status: Patch (to be ported) » Fixed
select max(aid) from accesslog;
100
ALTER TABLE accesslog AUTO_INCREMENT = 100;

http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mwangi’s picture

the solution suggested by andypost did it for me.

I have a drupal multisite system running on IIS - I'd made a copy of the main site so that I can work on the template offline and in the process it broke my mysql.

All sorted now.

radimklaska’s picture

My table was marked as crashed so I wasn't allowed to ALTER TABLE. Repairing the table also fixed bad AUTO_INCREMENT.

REPAIR TABLE accesslog;