summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-06-30 04:23:10 +0200
committermkanat%bugzilla.org <>2008-06-30 04:23:10 +0200
commit0a566f92417aa741828413b00585f48f72b5c639 (patch)
tree3bcb312d5c86eb695ecc9e6c3a4a6106fd3cc8a9 /Bugzilla/DB
parentba0b55cebea4cf2dd2085547e38e8f540f10c03b (diff)
downloadbugzilla-0a566f92417aa741828413b00585f48f72b5c639.tar.gz
bugzilla-0a566f92417aa741828413b00585f48f72b5c639.tar.xz
Bug 327344: Create sql_iposition and use it in Search.pm to fix the fact that searching for Turkish characters didn't do case-insensitivity properly.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 80f1cd793..8a64d3646 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -183,13 +183,14 @@ sub sql_interval {
return "INTERVAL $interval $units";
}
-sub sql_position {
+sub sql_iposition {
my ($self, $fragment, $text) = @_;
+ return "INSTR($text, $fragment)";
+}
- # mysql 4.0.1 and lower do not support CAST
- # (checksetup has a check for unsupported versions)
+sub sql_position {
+ my ($self, $fragment, $text) = @_;
- my $server_version = $self->bz_server_version;
return "INSTR(CAST($text AS BINARY), CAST($fragment AS BINARY))";
}