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
9f1e3658
Commit
9f1e3658
authored
Feb 20, 2015
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1088086: Possible duplicate search doesn't return any results if you input "a->b" (for any a/b)
r=dylan,a=glob
parent
16009fb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
Mysql.pm
Bugzilla/DB/Mysql.pm
+11
-7
No files found.
Bugzilla/DB/Mysql.pm
View file @
9f1e3658
...
...
@@ -184,15 +184,19 @@ sub sql_fulltext_search {
if
(
$text
=~
/(?:^|\W)[+\-<>~"()]/
||
$text
=~
/[()"*](?:$|\W)/
)
{
$mode
=
'IN BOOLEAN MODE'
;
# quote un-quoted compound words
my
@words
=
quotewords
(
'[\s()]+'
,
'delimiters'
,
$text
);
foreach
my
$word
(
@words
)
{
# match words that have non-word chars in the middle of them
if
(
$word
=~
/\w\W+\w/
&&
$word
!~
m/"/
)
{
$word
=
'"'
.
$word
.
'"'
;
my
@terms
=
split
(
quotemeta
(
FULLTEXT_OR
),
$text
);
foreach
my
$term
(
@terms
)
{
# quote un-quoted compound words
my
@words
=
quotewords
(
'[\s()]+'
,
'delimiters'
,
$term
);
foreach
my
$word
(
@words
)
{
# match words that have non-word chars in the middle of them
if
(
$word
=~
/\w\W+\w/
&&
$word
!~
m/"/
)
{
$word
=
'"'
.
$word
.
'"'
;
}
}
$term
=
join
(
''
,
@words
);
}
$text
=
join
(
''
,
@word
s
);
$text
=
join
(
FULLTEXT_OR
,
@term
s
);
}
# quote the text for use in the MATCH AGAINST expression
...
...
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