Faulty version check in foreign_key_info

Bernt Marius Johnsen <[email protected]> Wed, 27 Oct 2010 17:04:01 +0200
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
The version check in foreign_key_info fails to check the minor version. 
The fix is easy, though:

--- a/lib/DBD/mysql.pm
+++ b/lib/DBD/mysql.pm
@@ -638,7 +638,7 @@ sub foreign_key_info {

      # INFORMATION_SCHEMA.KEY_COLUMN_USAGE was added in 5.0.6
      my ($maj, $min, $point) = _version($dbh);
-    return if $maj < 5 || ($maj == 5 && $point < 6);
+    return if $maj < 5 || ($maj == 5 && $min == 0 && $point < 6);

      my $sql = <<'EOF';
  SELECT NULL AS PKTABLE_CAT,

-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]