Support » Networking WordPress » All IDs Incrementing By 10 Instead of 1

  • Resolved Curtiss Grymala


    I’ve got a weird, fringe case where, on one of my sites, all of the IDs are incrementing by 10 instead of 1.

    For instance, the second site I created has an ID of 11 instead of having an ID of 2. With 501 users in our database, the ID of the most recent user is 5021. MySQL indicates that the next auto-increment ID for the table is 5022, but if I add another user, that user will end up with an ID of 5031 instead.

    This is happening wherever WordPress uses auto-incrementing IDs (site table, blogs table, users table, usermeta table, posts tables, post_meta, etc., etc.)

    At this point, I’m not extremely worried about it, as everything still seems to be working just fine; but I am concerned that once we really start pouring content and/or meta data into the database, it’s remotely possible that some of the IDs will eventually reach the unsigned BIGINT limit of 4294967295 more quickly (10 times as quickly) than it normally would.

    I’ve tested inserting directly into MySQL from the command-line, and it still causes the issue, so I suspect that something is messed up in our SQL server somewhere, but I don’t even know where to begin looking.

    If I run a SHOW CREATE TABLE query on a table that includes 3 records, I get a result that indicates the next auto-increment ID is 22 (AUTO_INCREMENT=22), but if I then run an INSERT query on that table, the ID of the inserted data will be 31 instead of 22.

    Has anyone seen this before? Anyone have any clue what might be happening?

    In case it matters, all of our database tables are using the InnoDB engine rather than MyISAM. Also, we have a virtually identical set up (the only real differences are the name of the database and the prefixes used for the WordPress tables) on another server that is working just fine.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘All IDs Incrementing By 10 Instead of 1’ is closed to new replies.