On 32-bit systems, with post IDs higher than PHP_INT_MAX (2147483647) wordpress does not run fine
|Reported by:||copesc||Owned by:|
Logging all the MySQL queries I discovered that the queries that should pick my posts were all doing something like this:
SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647,2147483647)
This 2147483647 number clearly has something in it: it's the PHP_INT_MAX value on 32-bit operating systems, while on 64-bit machines it's 9223372036854775807 http://php.net/manual/en/language.types.integer.php
So, the problem is divided in 2 parts: I run on a 32 bit system, and I have my IDs a bit too high.
I know that 2147483647 is a bit high for a post ID, but I discovered this the hard way.
Now, I would have preferred an error message in the administrator interface. Do you think it's a good idea?