From 1af7f272868e1d7fa84c69be59be55abd62993d2 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 27 May 2005 03:09:22 +0000 Subject: Bug 286672: Require correct DBD depending on the $db_driver in use Patch By Max Kanat-Alexander r=LpSolit, a=justdave --- Bugzilla/DB.pm | 6 +++++- Bugzilla/DB/Mysql.pm | 1 + Bugzilla/DB/Pg.pm | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 850ea683a..f252420f6 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -187,7 +187,7 @@ sub _handle_error { } # List of abstract methods we are checking the derived class implements -our @_abstract_methods = qw(REQUIRED_VERSION PROGRAM_NAME +our @_abstract_methods = qw(REQUIRED_VERSION PROGRAM_NAME DBD_VERSION new sql_regexp sql_not_regexp sql_limit sql_to_days sql_date_format sql_interval bz_lock_tables bz_unlock_tables); @@ -963,6 +963,10 @@ to the admin to let them know what DB they're running. The name of the Bugzilla::DB module that we are. For example, for the MySQL Bugzilla::DB module, this would be "Mysql." For PostgreSQL it would be "Pg." +=item C + +The minimum version of the DBD module that we require for this database. + =head1 CONNECTION A new database handle to the required database can be created using this diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index afa7fe17d..4fb755da7 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -49,6 +49,7 @@ use base qw(Bugzilla::DB); use constant REQUIRED_VERSION => '3.23.41'; use constant PROGRAM_NAME => 'MySQL'; use constant MODULE_NAME => 'Mysql'; +use constant DBD_VERSION => '2.9003'; sub new { my ($class, $user, $pass, $host, $dbname, $port, $sock) = @_; diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 4fe8d2244..86c5497cd 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -51,6 +51,7 @@ use constant BLOB_TYPE => { pg_type => DBD::Pg::PG_BYTEA }; use constant REQUIRED_VERSION => '7.03.0000'; use constant PROGRAM_NAME => 'PostgreSQL'; use constant MODULE_NAME => 'Pg'; +use constant DBD_VERSION => '1.31'; sub new { my ($class, $user, $pass, $host, $dbname, $port) = @_; -- cgit v1.2.3-65-gdbad