[wp-hackers] Re: Changing MySQL minimum version

Austin Matzko if.website at gmail.com
Wed Nov 29 02:44:31 GMT 2006

On 11/28/06, Ryan Boren <ryan at boren.nu> wrote:
> 2.1 will bump the requirement to either 4.0 or 4.1.  We don't currently
> need 4.1 functionality, but MySQL has dropped support for 4.0.  I'm
> thinking we should still target 4.0.  4.0 gives us what we need for now.

Here's one way we could use 4.1 functionality.  The last time I
checked, query_posts("cat=-3") excludes posts of category 3 only if
the post isn't categorized under other categories.  If it is assigned
another category, then it's returned.  To fix this with MySQL
functionality < 4.1 would be a hassle.

With the sub-query functionality introduced in MySQL 4.1, we could
easily use a sub-query to define what we're excluding.

I think there are other WordPress functions where sub-queries would
provide a more efficient and precise way of excluding results.  Since
as you mention MySQL has discontinued support for 4.0 already, and
we're going to bump the minimum version anyways, why not go to 4.1?

More information about the wp-hackers mailing list