i am searching to try to solve this same issue, although not due to an upgrade, but rather a host-move and database restore. i’m hoping you solve your problem because it might shed light on mine 🙁
Last comment there..
http://trac.wordpress.org/ticket/2094
http://wordpress.org/support/topic/63027?replies=4
I’m not really sure of this myself, never had the problem. [knock on wood though].. But, that’s one of the things I’ve found while searching, and I’m sure you (nicknormal) came across it as well. =) Good luck with this though..
spencerp
It sounds like your AUTO_INCREMENT property was cleared from that table.
READ THIS WHOLE POST BEFORE DOING ANYTHING.
If you are comfortable with running SQL statements, you can fix this yourself by following these instructiosn. Otherwise you should ask your site administrator to do the following:
1. Run this select statement:
SELECT MAX(ID) FROM wp_posts
2. Add 1 to the number you see on the screen and write down the new number.
3. Run this next SQL statement using that new number instead of ###:
ALTER TABLE wp_posts SET AUTO_INCREMENT=###
You’re done.
Of couse, if you didn’t use wp as your table prefix (look at wp-config.php in your blog root to double check), then you should replace wp_ with the correct table prefix.
Also, case matters. WP_posts is NOT the same as wp_posts or WP_POSTS. Type it with the correct case or you’ll get an error.
Test this fix by creating a new post. It should have the number you wrote down as an ID.
Hopefully that will help. If you have any questions (other than “How did this happen?” – I can’t answer that one) let me know. I’ll try to check back on this one…
__________________________________________
Brian Layman
http://www.TheCodeCave.com
Whoops, I slipped into update syntax there for a second, the line that reads:
ALTER TABLE wp_posts SET AUTO_INCREMENT=###
Should be:
ALTER TABLE wp_posts AUTO_INCREMENT=###
See the difference? Just remove the word SET. MySQL does not use or recognize it in ALTER statements…. It won’t do your DB any harm if youran it with the word SET in there. It would just give you a syntax error.
Sorry for the confusion…
__________________________________________
Brian Layman
TheCodeCave.com