Closed
Bug 392099
Opened 17 years ago
Closed 17 years ago
unable to search for downloads with % (SQLite MATCH_ALL) or _ (SQLite MATCH_ONE) in the name
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha8
People
(Reporter: moco, Assigned: moco)
References
()
Details
Attachments
(2 files)
2.05 KB,
patch
|
sdwilsh
:
review+
|
Details | Diff | Splinter Review |
194 bytes,
application/octet-stream
|
Details |
fix LIKE search to allow for search terms with % _ the solution: fix this code at http://lxr.mozilla.org/seamonkey/source/toolkit/mozapps/downloads/content/downloads.js#756 sql += "name LIKE '%" + terms[i] + "%' "; to be: sql += "name LIKE '%" + stmt.escapeStringForLIKE(terms[i], '/') + "%' ESCAPE '/' ";
Flags: in-litmus?
Assignee | ||
Comment 1•17 years ago
|
||
actually, this shouldn't this be something like: sql += "name LIKE ?1 ESCAPE '/'"; and then bindStringParamer(x, "%" + stmt.escapeStringForLIKE(terms[i], '/') + "%"); see http://lxr.mozilla.org/seamonkey/source/storage/test/unit/test_like_escape.js#56 for an example of how to do this.
Assignee | ||
Updated•17 years ago
|
Depends on: 388517
Flags: blocking-firefox3?
Summary: fix LIKE search to allow for search terms with % _ → unable to search for downloads with % (SQLite MATCH_ALL) or _ (SQLite MATCH_ONE) in the name
Assignee | ||
Comment 2•17 years ago
|
||
Attachment #276594 -
Flags: review?(sdwilsh)
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → sspitzer
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → Firefox 3 M8
Comment 3•17 years ago
|
||
Comment on attachment 276594 [details] [diff] [review] patch, also fixes the problem that a search for "foo bar cheese" would match for items containing foo, bar, or cheese and not only items containing "foo bar cheese" Thanks! r=sdwilsh
Attachment #276594 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Updated•17 years ago
|
Status: NEW → ASSIGNED
Comment 4•17 years ago
|
||
http://litmus.mozilla.org/show_test.cgi?id=4573 in-litmus+ for comment 2 only at this time. Let me know if you find a good, reliable (fixed-location) testcase for comment 0, and I'll write a Litmus testcase and change the ? to +
Assignee | ||
Comment 5•17 years ago
|
||
stephen, let's just attach a file with the desired name to this bug, and use that.
Assignee | ||
Comment 6•17 years ago
|
||
Assignee | ||
Comment 7•17 years ago
|
||
stephen, use https://bugzilla.mozilla.org/attachment.cgi?id=277235 for your litmus test case. note: with that test case, a download manager quick search for "%" gives me that file, but a download manager quick search for just "_" does not give me that file, so something is not working right. (note, a quick earch for "e_" does give me the result.) so this is not completely fixed. stephen, can you add the "%" and "_" scenarios to your test litmus test case? I'll investigate why "_" doesn't work.
Assignee | ||
Comment 8•17 years ago
|
||
actually, _ might be working, and I might just be running into bug #392386.
Assignee | ||
Comment 9•17 years ago
|
||
_ is working, I was just hitting #392386. marking as fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
http://litmus.mozilla.org/show_test.cgi?id=4574 in-litmus+ now, for both cases (comment 7 and comment 2).
Flags: in-litmus? → in-litmus+
Updated•17 years ago
|
Flags: blocking-firefox3? → blocking-firefox3+
Verified FIXED using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a8pre) Gecko/2007090405 Minefield/3.0a8pre with both "_" and "%" as search terms (and in conjunction in a separate search query with their surrounding filename characters).
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Flags: in-testsuite?
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•