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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
0811ac92
Commit
0811ac92
authored
Jul 08, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 292119: [PostgreSQL] POSITION(...) clause "must be type boolean, not type integer"
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=justdave
parent
4f25eedf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
Search.pm
Bugzilla/Search.pm
+4
-4
User.pm
Bugzilla/User.pm
+6
-6
checksetup.pl
checksetup.pl
+2
-2
No files found.
Bugzilla/Search.pm
View file @
0811ac92
...
...
@@ -988,10 +988,10 @@ sub init {
$term
=
"$ff != $q"
;
},
",casesubstring"
=>
sub
{
$term
=
$dbh
->
sql_position
(
$q
,
$ff
);
$term
=
$dbh
->
sql_position
(
$q
,
$ff
)
.
" > 0"
;
},
",substring"
=>
sub
{
$term
=
$dbh
->
sql_position
(
lc
(
$q
),
"LOWER($ff)"
);
$term
=
$dbh
->
sql_position
(
lc
(
$q
),
"LOWER($ff)"
)
.
" > 0"
;
},
",substr"
=>
sub
{
$funcsbykey
{
",substring"
}
->
();
...
...
@@ -1466,7 +1466,7 @@ sub ListIDsForEmail {
}
elsif
(
$type
eq
'substring'
)
{
&::
SendSQL
(
"SELECT userid FROM profiles WHERE "
.
$dbh
->
sql_position
(
lc
(
::
SqlQuote
(
$email
)),
"LOWER(login_name)"
)
.
" "
.
$dbh
->
sql_limit
(
51
));
"
> 0
"
.
$dbh
->
sql_limit
(
51
));
while
(
&::
MoreSQLData
())
{
my
(
$id
)
=
&::
FetchSQLData
();
push
(
@list
,
$id
);
...
...
@@ -1522,7 +1522,7 @@ sub GetByWordListSubstr {
foreach
my
$word
(
split
(
/[\s,]+/
,
$strs
))
{
if
(
$word
ne
""
)
{
push
(
@list
,
$dbh
->
sql_position
(
lc
(
::
SqlQuote
(
$word
)),
"LOWER($field)"
));
"LOWER($field)"
)
.
" > 0"
);
}
}
...
...
Bugzilla/User.pm
View file @
0811ac92
...
...
@@ -682,18 +682,18 @@ sub match {
&&
(
length
(
$str
)
>=
3
))
{
my
$sqlstr
=
&::
SqlQuote
(
u
c
(
$str
));
my
$sqlstr
=
&::
SqlQuote
(
l
c
(
$str
));
my
$query
=
"SELECT DISTINCT userid, realname, login_name, "
.
my
$query
=
"SELECT DISTINCT userid, realname, login_name, "
.
"LENGTH(login_name) AS namelength "
.
"FROM profiles"
;
if
(
&::
Param
(
'usevisibilitygroups'
))
{
$query
.=
", user_group_map"
;
}
$query
.=
" WHERE "
.
$dbh
->
sql_position
(
$sqlstr
,
"UPPER(login_name)"
)
.
" OR "
.
$dbh
->
sql_position
(
$sqlstr
,
"UPPER(realname)"
)
;
$query
.=
" WHERE "
.
$dbh
->
sql_position
(
$sqlstr
,
'LOWER(login_name)'
)
.
" > 0"
.
" OR "
.
$dbh
->
sql_position
(
$sqlstr
,
'LOWER(realname)'
)
.
" > 0"
;
if
(
&::
Param
(
'usevisibilitygroups'
))
{
$query
.=
" AND user_group_map.user_id = userid"
.
" AND isbless = 0"
.
...
...
checksetup.pl
View file @
0811ac92
...
...
@@ -3687,8 +3687,8 @@ if ($dbh->isa('Bugzilla::DB::Mysql')
print
"Removing paths from filenames in attachments table...\n"
;
$sth
=
$dbh
->
prepare
(
"SELECT attach_id, filename FROM attachments "
.
"WHERE "
.
$dbh
->
sql_position
(
q{'/'}
,
'filename'
)
.
" OR "
.
$dbh
->
sql_position
(
q{'\\\\'}
,
'filename'
)
);
"WHERE "
.
$dbh
->
sql_position
(
q{'/'}
,
'filename'
)
.
" > 0 OR "
.
$dbh
->
sql_position
(
q{'\\\\'}
,
'filename'
)
.
" > 0"
);
$sth
->
execute
;
while
(
my
(
$attach_id
,
$filename
)
=
$sth
->
fetchrow_array
)
{
...
...
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