Skip Menu |

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

Report information
The Basics
Id: 16733
Status: new
Priority: 0/
Queue: Class-DBI-mysql

People
Owner: Nobody in particular
Requestors: scotty [...] scottyallen.com
Cc:
AdminCc:

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



Subject: Patch: Small bug in Class::DBI::mysql with regards to column_type and column names with capital letters
From: Scotty Allen <scotty [...] scottyallen.com>
To: bug-Class-DBI-mysql [...] rt.cpan.org
Date: Mon, 26 Dec 2005 10:23:51 -0700
Hi Tony, I found a small bug in Class::DBI::mysql. If you iterate across all of the columns in a class, and print out their column types, you'll get null for those columns with capital letters in their names in the db. I believe this is because the capital letters are stripped in Class::DBI, but _column_info returns the information with capital letters. The fix I came up with is to change the line in _column_info from: return { map { $_->{field} => $_ } $sth->fetchall_hash }; to: return { map { lc($_->{field}) => $_ } $sth->fetchall_hash }; Thanks, Scotty -- Scotty Allen Consulting 303-546-0251 scotty@scottyallen.com