[wp-trac] [WordPress Trac] #26042: wp_save_post_revision() can compare against the wrong $last_revision post
WordPress Trac
noreply at wordpress.org
Thu Mar 6 20:03:34 UTC 2014
#26042: wp_save_post_revision() can compare against the wrong $last_revision post
----------------------------------------+-----------------------------
Reporter: wonderboymusic | Owner: wonderboymusic
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.9
Component: Revisions | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:2 nacin]:
> We could sort by both, `'orderby' => 'date ID'` should be fine, since we
want DESC for both. We do this in some other places.
FWIW, I don't see `'orderby' => 'date ID'` anywhere else in core.
I don't think it works as expected, due to #17065, as noted in
comment:1:ticket:23923.
The clause it generates is:
{{{
ORDER BY trunk_posts.post_date,trunk_posts.ID DESC
}}}
According to [https://dev.mysql.com/doc/refman/5.0/en/sorting-rows.html
MySQL reference], `DESC` only applies to `trunk_posts.ID` here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26042#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list