Skip Menu |
 

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 62515
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: bernt.johnsen [...] oracle.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 4.017
Fixed in: (no value)



Subject: Faulty version check in foreign_key_info
Download (untitled) / with headers
text/plain 538b
The version check in foreign_key_info fails to check the minor version. As a consequence foreign_key_info does not work for MySQL 5.6.1. 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,
Download (untitled) / with headers
text/plain 870b
Hi Bernt, Thanks for your report and sorry for the late reply. The issue you reported has already been fixed two years ago, although a little less subtle: https://github.com/perl5-dbi/DBD-mysql/commit/e66fa61923a682c3981e3ff0918861e625655f83 -- Mike On Thu Oct 28 09:25:49 2010, berntm wrote: Show quoted text
> The version check in foreign_key_info fails to check the minor version. > As a consequence foreign_key_info does not work for MySQL 5.6.1. > > 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,


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.