Welcome to WebmasterWorld Guest from 50.19.34.234

Forum Moderators: open

Message Too Old, No Replies

MYSQL primary key skips rows

     

imfree

10:45 am on Aug 13, 2010 (gmt 0)

5+ Year Member



Hi all,

I'm using MYSQL 5.0.91
I have a MyISAM table with a primary key defined as int(11)
This is a simple user registration application.

Looking at the table, I'm seeing holes in the primary key, sometimes skipping one number, sometimes two, e.g. 263, 264, 266, 268. Nothing has been deleted - I'm the only one with access.
I'm woried that users' registration details are being lost somehow.

Has anyone else experienced this?

Any help very much appreciated.

coopster

12:09 pm on Aug 15, 2010 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Welcome to WebmasterWorld, imfree.

How do you know it is skipping numbers? Are you viewing the report sorted by that key?

imfree

11:54 pm on Aug 16, 2010 (gmt 0)

5+ Year Member



Coopster,

thanks very much for taking the time to reply.

Two things:

1. I'm an idiot. The code doing the delete was staring me in the face, and was doing exactly what it should have, which is to delete duplicate entries.

2. Sorry to have wated your time, and the time of anyone who read this.

Thanks again for your reply.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month