Skip Menu |

This queue is for tickets about the DBIx-DBSchema CPAN distribution.

Report information
The Basics
Id: 20859
Status: resolved
Priority: 0/
Queue: DBIx-DBSchema

People
Owner: Nobody in particular
Requestors: cjm [...] fruitfly.org
Cc:
AdminCc:

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



Subject: Fix for bug in mysql.pm
Hi Ivan I notice that Table::new_native wraps calls to DBD::mysql->columns in an eval() mysql->column contains a die() which gets silently caught by the eval, which is confusing. The offending line which causes the die() is: $_->{'Type'} =~ /^(\w+)\(?([\d\,]+)?\)?( unsigned)?$/ or die "Illegal type: ". $_->{'Type'}. "\n"; I have a type in my schema char(64) binary which does not match your regexp. My hack is to change the regex to $_->{'Type'} =~ /^(\w+)\(?([\d\,]+)?\)?/ or die "Illegal type: ". $_->{'Type'}. "\n"; This matches, but loses qualifiers such as 'unsigned' and 'binary', but this wasn't being stored anyway. If you could incorporate this into the next release that would be great Many thanks for your work in developing this fantastic module! Chris
fixed in CVS; will be in 0.33, thanks! On Sat Aug 05 15:12:41 2006, IVAN wrote: Show quoted text
> Hi Ivan > > I notice that Table::new_native wraps calls to DBD::mysql->columns
in Show quoted text
> an > eval() > > mysql->column contains a die() which gets silently caught by the
eval, Show quoted text
> which is confusing. > > The offending line which causes the die() is: > > $_->{'Type'} =~ /^(\w+)\(?([\d\,]+)?\)?( unsigned)?$/ > or die "Illegal type: ". $_->{'Type'}. "\n"; > > I have a type in my schema > > char(64) binary > > which does not match your regexp. > > My hack is to change the regex to > > $_->{'Type'} =~ /^(\w+)\(?([\d\,]+)?\)?/ > or die "Illegal type: ". $_->{'Type'}. "\n"; > > This matches, but loses qualifiers such as 'unsigned' and 'binary', > but > this wasn't being stored anyway. > > If you could incorporate this into the next release that would be > great > > Many thanks for your work in developing this fantastic module! > > Chris