[wp-hackers] LEFT JOIN in 2.7 to JOIN in 2.8; Why?

Lynne Pope lynne.pope at gmail.com
Wed Jun 17 07:19:13 GMT 2009


2009/6/17 Peter Westwood <peter.westwood at ftwr.co.uk>

>
>  The original change in [11259] changed 4 instanced of LEFT JOIN to just
> JOIN.
>
> On the 25th of May in [11452] one of the changes was reverted but the rest
> were kept.
>
> The change that was reverted was because of the issue it caused with custom
> taxonomies - #9851
>
> The packages that are made available for download are built from svn so
> this change would have been included.
>
> Looking at the RC1 zipfile I can see this single LEFT JOIN in
> wp-includes/query.php:
>
>                        if ( $post_status_join ) {
>                                $join .= " LEFT JOIN $wpdb->posts AS p2 ON
> ($wpdb->posts.post_parent = p2.ID) ";
>                                foreach ( $statuswheres as $index =>
> $statuswhere )
>                                        $statuswheres[$index] =
> "($statuswhere OR ($wpdb->posts.post_status = 'inherit' AND " .
> str_replace($wpdb->posts, 'p2', $statuswhere) . "))";
>                        }
>
>
Yep, you are completely right Westi - my bad (doing diffs on wrong lines -
doh!).
The LEFT JOIN has not been reverted in postmeta queries.

That's me back to the drawing board ;)

Cheers,
Lynne


More information about the wp-hackers mailing list