[wp-trac] [WordPress Trac] #10655: Post/Page ID Count skips one number when a new page or post created in WordPress 2.8.2

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 19 21:38:14 UTC 2009


#10655: Post/Page ID Count skips one number when a new page or post created in
WordPress 2.8.2
--------------------------+-------------------------------------------------
 Reporter:  misty9        |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:  2.8.2     
 Severity:  minor         |    Keywords:            
--------------------------+-------------------------------------------------
 The  post or page ID count skips one number whenever a new page or post is
 created.

 This behavior doesn't occur in WP 2.2.2 where post AND page IDs are
 sequential. In short, one can easily identify the total number of pages
 and posts for a given website  by looking at the ID numbers.

 I've notices that after creating a page with ID 25, the next post I had
 created was given an ID 27, this pattern repeats itself whenever more
 pages and post are created. In other words, one number is kind of wasted.

 Here are my question:

 1. Isn't there a better way in SQL to wisely handle the skipped post ID's?

 2. Why doesn't this cumbersome issue found in WP 2.2.2?


 -----------------------------------------------------------
 SELECT id, post_title, post_status, post_parent
 FROM wp_posts;

                        ID    Post_title                Post_status
 Post_parent
                         25      Aug 19 test page        publish 0
                         26      Aug 19 test page        inherit 25
                         27      post test       publish 0
                         28      post test       inherit 27
                         29      test2   publish 0
                         30      test2   inherit 29
                         31      post Aug 19, 2009       publish 0
                         32      post Aug 19, 2009       inherit 31
 -----------------------------------------------------------

 I have both WP 2.2.2 and 2.8.2 databases ready for your research if
 needed.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10655>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list