Closed (duplicate)
Project:
Drupal core
Version:
6.9
Component:
search.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2009 at 15:31 UTC
Updated:
2 Mar 2009 at 14:19 UTC
If you do a search for an integer value longer than 10 digits, it uses "2147483647" in the SQL statement in doSearch().
If you comment out line 848 of function _search_parse_query
$s = $num ? ((int)ltrim($s, '-0')) : $s;
the problem is cured. Presumably the textual search term overflows as is cast to integer.
Comments
Comment #1
damien tournoud commentedAnd this is a duplicate of your first report #385812: Integers over 10 digits incorrectly indexed for search.
Comment #2
mchaplin commentedHi Damien
This is not a duplicate of my first report.
1st issue is to do with the incorrect storage of integer values in the search index.
2nd issue is to do with the formation of the correct SQL statement to search that index.
The problems arise from 2 different lines of code in search.module.
It would be possible that one problem would be fixed and not the other.
thanks
Mike
Comment #3
mchaplin commentedComment #4
damien tournoud commentedPlease don't open two issues for two very similar problems (using the exact same code:
(int)ltrim($s, '-0')) occurring in the search module. And join the discussion in #323299: Integers above 10 digits length scrambled.