Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #14014: Search number > 2147483647 fails on 64-bit systems
When a numeric search term is entered, the Filter API will only check for matches in the bug and bugnote id fields when the search term is within a valid range. This was never an issue on 32-bit systems, but on 64-bit OS, PostgreSQL throws an "integer out of range" error when executing the query because the search term is cast to (int) and PHP_INT_MAX is greater than the largest value allowed for the numeric DB fields (4-byte int, 2^31-1). This issue does not exist on MySQL as the value is capped to the maximum allowed; behavior was not tested on Oracle, DB2 or MSSQL. The fix for PostgreSQL behavior is a hack, but I can't think of any better solution (ideally, we should be able to query the DB for the maximum allowed value for a field).
- Loading branch information