[wp-trac] [WordPress Trac] #17548: wp_trash_post() does not call update_post_count()

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 10 20:26:04 UTC 2011


#17548: wp_trash_post() does not call update_post_count()
--------------------------------------------------+-----------------------
 Reporter:  joehoyle                              |       Owner:  ryan
     Type:  defect (bug)                          |      Status:  reopened
 Priority:  normal                                |   Milestone:  3.3
Component:  Taxonomy                              |     Version:  3.2
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch dev-feedback needs-testing  |
--------------------------------------------------+-----------------------

Comment (by ryan):

 EXPLAIN SELECT COUNT(*) FROM wp_trunk_term_relationships, wp_trunk_posts
 p1 WHERE p1.ID = wp_trunk_term_relationships.object_id AND ( post_status =
 'publish' OR ( post_status = 'inherit' AND post_parent > 0 AND ( SELECT
 post_status FROM wp_trunk_posts WHERE ID = p1.post_parent ) = 'publish' )
 ) AND post_type IN ('attachment') AND term_taxonomy_id = 49

 {{{
 id      select_type     table   type    possible_keys   key     key_len
 ref     rows    Extra
 1       PRIMARY wp_trunk_term_relationships     ref
 PRIMARY,term_taxonomy_id        term_taxonomy_id        8       const   1
 1       PRIMARY p1      eq_ref  PRIMARY,type_status_date,post_parent
 PRIMARY 8       wordpress.wp_trunk_term_relationships.object_id 1
 Using where
 2       DEPENDENT SUBQUERY      wp_trunk_posts  eq_ref  PRIMARY PRIMARY 8
 wordpress.p1.post_parent        1
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17548#comment:36>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list