Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
993f0b35
Commit
993f0b35
authored
Apr 20, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 284599: Use of REGEXP search is not consistent wrt case sensitivity
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
parent
57394ff0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
DB.pm
Bugzilla/DB.pm
+4
-2
Pg.pm
Bugzilla/DB/Pg.pm
+2
-2
Search.pm
Bugzilla/Search.pm
+3
-3
No files found.
Bugzilla/DB.pm
View file @
993f0b35
...
...
@@ -1199,7 +1199,8 @@ formatted SQL command have prefix C<sql_>. All other methods have prefix C<bz_>.
=item C<sql_regexp>
Description: Outputs SQL regular expression operator for POSIX regex
searches in format suitable for a given database.
searches (case insensitive) in format suitable for a given
database.
Abstract method, should be overriden by database specific code.
Params: none
Returns: formatted SQL for regular expression search (e.g. REGEXP)
...
...
@@ -1208,7 +1209,8 @@ formatted SQL command have prefix C<sql_>. All other methods have prefix C<bz_>.
=item C<sql_not_regexp>
Description: Outputs SQL regular expression operator for negative POSIX
regex searches in format suitable for a given database.
regex searches (case insensitive) in format suitable for a given
database.
Abstract method, should be overriden by database specific code.
Params: none
Returns: formatted SQL for negative regular expression search
...
...
Bugzilla/DB/Pg.pm
View file @
993f0b35
...
...
@@ -87,11 +87,11 @@ sub bz_last_key {
}
sub
sql_regexp
{
return
"~"
;
return
"~
*
"
;
}
sub
sql_not_regexp
{
return
"!~"
return
"!~
*
"
}
sub
sql_limit
{
...
...
Bugzilla/Search.pm
View file @
993f0b35
...
...
@@ -1000,10 +1000,10 @@ sub init {
$term
=
$dbh
->
sql_position
(
lc
(
$q
),
"LOWER($ff)"
)
.
" = 0"
;
},
",regexp"
=>
sub
{
$term
=
"
LOWER($ff)
"
.
$dbh
->
sql_regexp
()
.
" $q"
;
$term
=
"
$ff
"
.
$dbh
->
sql_regexp
()
.
" $q"
;
},
",notregexp"
=>
sub
{
$term
=
"
LOWER($ff)
"
.
$dbh
->
sql_not_regexp
()
.
" $q"
;
$term
=
"
$ff
"
.
$dbh
->
sql_not_regexp
()
.
" $q"
;
},
",lessthan"
=>
sub
{
$term
=
"$ff < $q"
;
...
...
@@ -1506,7 +1506,7 @@ sub GetByWordList {
$word
=~
s/^'//
;
$word
=~
s/'$//
;
$word
=
'(^|[^a-z0-9])'
.
$word
.
'($|[^a-z0-9])'
;
push
(
@list
,
"
lower($field)
"
.
$dbh
->
sql_regexp
()
.
" '$word'"
);
push
(
@list
,
"
$field
"
.
$dbh
->
sql_regexp
()
.
" '$word'"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment