On Thu, Oct 16, 2003 at 02:00:01PM -0400, Scott R. Godin wrote: > Tim Bunce wrote: > > > I think the latest DBD::mysql contains my column info code and > > thus does return set & enum values. > > > > Tim. > > > > On Tue, Oct 14, 2003 at 09:01:14AM +1000, Ron Savage wrote: > >> On Mon, 13 Oct 2003 13:54:46 -0400, Scott R. Godin wrote: > >> > >> Hi Scott > >> > >> >?A while back in February, Tim and Ron were discussing DBD::mysql > >> >?and column_info.. > >> > >> I'm still interested in info in this area. > >> > >> >?This is the only thing I could find that *may* relate to my > >> >?question, so I'm asking here for further clarification. > >> > >> This is the place. > >> > >> >?It's not clear in the docs (at least not to me) whether I can have > >> >?column_info return the possible values of a SET or ENUM column, > >> >?without hard-coding them into my scripts. > >> > >> I too would like to know that. > >> > > Well I've tried several iterations of this, and the DBD::mysql and DBI > current releases don't accept a column value on > > my $sth = $dbh->column_info( undef, $schema, $table, $column); > > but instead require me to use '%'.
Send a patch. It wouldn't be too hard to implement. > However this results in: > > $ perl col_info.pl > Undefined subroutine &DBD::mysql::db::SQL_VARCHAR called at > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBD/mysql.pm line > 337. > > which I don't quite understand. I tried adding :sql_types to the DBI > declaration, but no go. It's a minor bug in DBD::mysql. Try adding "use DBI qw(:sql_types);" just after "package DBD::mysql::db;" in DBD/mysql.pm Looks like it's not fixed in the DBD-mysql-2.9003_1 release either. Tim.