summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-05 16:36:07 +0100
committermkanat%kerio.com <>2005-03-05 16:36:07 +0100
commit0c1b77e123dbafb96168fe6affd6373b9aa081fe (patch)
tree9f4bf1de4a3b85d423238ed47a56746d70181e24 /checksetup.pl
parent8b47184604eb5868736e0a2a8ae894f6feceaa95 (diff)
downloadbugzilla-0c1b77e123dbafb96168fe6affd6373b9aa081fe.tar.gz
bugzilla-0c1b77e123dbafb96168fe6affd6373b9aa081fe.tar.xz
Bug 284598: INSTR function is not supported by postgres
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 50791d0f4..99000abc8 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -4175,8 +4175,8 @@ if (!$dbh->bz_get_field_def('longdescs', 'already_wrapped')) {
# at display-time.
print "Fixing old, mis-wrapped comments...\n";
$dbh->do(q{UPDATE longdescs SET already_wrapped = 0
- WHERE ( POSITION('\n' IN thetext ) > 80
- OR POSITION('\n' IN thetext ) = 0 )
+ WHERE (} . $dbh->sql_position(q{'\n'}, 'thetext') . q{ > 80
+ OR } . $dbh->sql_position(q{'\n'}, 'thetext') . q{ = 0)
AND SUBSTRING(thetext FROM 1 FOR 80) LIKE '% %'});
}
@@ -4547,8 +4547,8 @@ if (!defined $dbh->bz_get_index_def('longdescs', 'thetext')) {
print "Removing paths from filenames in attachments table...\n";
$sth = $dbh->prepare("SELECT attach_id, filename FROM attachments " .
- "WHERE INSTR(filename, '/') " .
- "OR INSTR(filename, '\\\\')");
+ "WHERE " . $dbh->sql_position(q{'/'}, 'filename') .
+ " OR " . $dbh->sql_position(q{'\\\\'}, 'filename'));
$sth->execute;
while (my ($attach_id, $filename) = $sth->fetchrow_array) {