summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB.pm
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-05-27 11:40:17 +0200
committerbugreport%peshkin.net <>2004-05-27 11:40:17 +0200
commit3a5de3cbf019668cc3963caa566feb1ee15b6e19 (patch)
tree822d974afbbc3e1092cb690faaa2a3a4cbfaec23 /Bugzilla/DB.pm
parentc5718f3890535bb27a2db35c1f08b22b05e89ac4 (diff)
downloadbugzilla-3a5de3cbf019668cc3963caa566feb1ee15b6e19.tar.gz
bugzilla-3a5de3cbf019668cc3963caa566feb1ee15b6e19.tar.xz
Bug 243351: Fix mysql version sensitivity in case-sensitive search
r=jouni a=justdave
Diffstat (limited to 'Bugzilla/DB.pm')
-rw-r--r--Bugzilla/DB.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index 684869006..a766a6e04 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -164,6 +164,16 @@ sub _handle_error {
return 0; # Now let DBI handle raising the error
}
+my $cached_server_version;
+sub server_version {
+ return $cached_server_version if defined($cached_server_version);
+ my $dbh = Bugzilla->dbh;
+ my $sth = $dbh->prepare('SELECT VERSION()');
+ $sth->execute();
+ ($cached_server_version) = $sth->fetchrow_array();
+ return $cached_server_version;
+}
+
1;
__END__