Issue 990778
Created on 2004-07-14 10:34 by don_fu, last changed 2004-07-19 00:31 by richard.
File name |
Uploaded |
Description |
Edit |
Remove |
back_mysql.patch
|
don_fu,
2004-07-14 10:34
|
back_mysql.patch |
|
|
msg1355 |
Author: [hidden] (don_fu) |
Date: 2004-07-14 10:34 |
|
If you do an "all-text" search for a word, that
produces no match, a mysql error will be provoked.
mysql doesn't like this query:
SELECT _issue.id
FROM _issue
WHERE _issue.__retired__ <>1 AND _issue.id
IN ()
which is produced in back_mysql.filter():
the indexer returns search_matches = {} and the backend
checks:
if search_matches is not None:
which obviously doesn't work.
I thought that:
if not search_matches:
...
would catch both None and {}, but this didn't work. See
patch for my clumsy solution
|
msg1356 |
Author: [hidden] (don_fu) |
Date: 2004-07-16 14:33 |
|
Logged In: YES
user_id=1083360
the patch doesn't fix everything. I still get an error, when
I'm using a very short word (<3 ch). I'll look deeper into
it when I'm back from my vacation in 2 weeks ;)
|
msg1357 |
Author: [hidden] (richard) |
Date: 2004-07-19 00:31 |
|
Logged In: YES
user_id=6405
The full-text indexer doesn't match text less than 3 characters.
I've altered the code such that we test at the top of filter():
# we can't match anything if search_matches is empty
if search_matches == {}:
return []
then the test later in the code, which is "search_matches is not
None", is untouched.
|
|
Date |
User |
Action |
Args |
2004-07-14 10:34:01 | don_fu | create | |
|