Welcome to WebmasterWorld Guest from 107.20.54.98

Forum Moderators: open

Message Too Old, No Replies

MYSQL primary key skips rows

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

New User

5+ Year Member

joined:June 17, 2010
posts: 2
votes: 0


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.
12:09 pm on Aug 15, 2010 (gmt 0)

Administrator

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

joined:July 31, 2003
posts:12533
votes: 0


Welcome to WebmasterWorld, imfree.

How do you know it is skipping numbers? Are you viewing the report sorted by that key?
11:54 pm on Aug 16, 2010 (gmt 0)

New User

5+ Year Member

joined:June 17, 2010
posts:2
votes: 0


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.