Closed
Bug 177436
Opened 22 years ago
Closed 22 years ago
User matching shouldn't be case-sensitive
Categories
(Bugzilla :: Creating/Changing Bugs, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.18
People
(Reporter: justdave, Assigned: myk)
References
Details
Attachments
(1 file, 2 obsolete files)
1.54 KB,
patch
|
justdave
:
review+
justdave
:
review+
|
Details | Diff | Splinter Review |
On bugzilla-tip on landfill (with usermatchtype in params set to "search" rather than "wildcard"), I entered "miller" in the CC field on a bug and hit Commit. I was prompted with several choices, none of which were me. The ones I got all had "miller" as part of their email address as well. I went back and changed it to "Miller" and this time it found me.
Comment 1•22 years ago
|
||
INSTR in mysql < 4.0 is case-sensitive, while LIKE is not. Per a brief discussion on #mozwebtools, this patch moves substring searches to LIKE rather than INSTR.
Assignee | ||
Comment 2•22 years ago
|
||
Comment on attachment 104787 [details] [diff] [review] Changes INSTR in queries to LIKE for case insensitivity Works, r=myk. It's trivial, but I want bbaetz to look it over too, since he was the one who suggested INSTR as I recall, so wait for his second r= before checking this in.
Attachment #104787 -
Flags: review+
Assignee | ||
Comment 3•22 years ago
|
||
Also you should fix the comment on line 138 to say something like "# then try sub-string search".
Comment 4•22 years ago
|
||
Removed INSTR from comments.
Attachment #104787 -
Attachment is obsolete: true
Comment 5•22 years ago
|
||
You need to escape literal \, %, and _ if you use LIKE. sqlquote does \, but not the others. I don't reacall mentioning using substring, but istm that it would be faster than LIKE. The correct way to do case insensitive substring stuff is to do SUBSTRING(TOUPPER(foo), $bar).
Comment 6•22 years ago
|
||
(where $bar is capitalised in advance in perl)
Comment 7•22 years ago
|
||
That's absolutely a better way of doing it. I presume you meant INSTR rather than SUBSTRING.
Attachment #104795 -
Attachment is obsolete: true
Reporter | ||
Comment 8•22 years ago
|
||
Comment on attachment 105093 [details] [diff] [review] Case-insensitive INSTR 2xr= justdave Tested on landfill, it works. a= justdave for checkin during 2.17.1 freeze
Attachment #105093 -
Flags: review+
Comment 9•22 years ago
|
||
Checked in for not_erik Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.6; previous revision: 1.5 done
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•22 years ago
|
Target Milestone: --- → Bugzilla 2.18
Comment 10•22 years ago
|
||
I did, yes pg doesn't have INSTR, so you should use: |position($bar in toupper(foo)) > 0| which is standard sql. Except that oracle doesn't appear to have 'position', so leave it as is, and we'll deal with it later.
Target Milestone: Bugzilla 2.18 → ---
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•