Re: $dbh->column_info changed behaviour between 5.0 and 4.1? Dugin DBD::mysql

Re: $dbh->column_info changed behaviour between 5.0 and 4.1? Dugin DBD::mysql

am 06.11.2005 22:25:20 von Patrick Galbraith

Daniel,

I've tested this with the latest 3.0002_4 (and 3.0002_3), and it seems
to work fine:

mysql> show create table t2;
+-------+--------------------------------------------------- ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ --------------------------------------------------------+
| Table | Create
Table
|
+-------+--------------------------------------------------- ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ --------------------------------------------------------+
| t2 | CREATE TABLE `t2` (
`a` int(11) default NULL,
`b` varchar(32) default NULL,
`c` varchar(64) default NULL,
`d` varchar(12) default NULL,
`e` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
`f` blob,
`g` text
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |
+-------+--------------------------------------------------- ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ --------------------------------------------------------+
1 row in set (0.00 sec)


The code:

my $sth= $dbh->column_info(undef, "test", "t2", '%');
my $col_ref= $sth->fetchall_arrayref;

for my $row(@$col_ref) {
print "$row->[3] $row->[4] $row->[5]\n";
}

The results:

e 93 TIMESTAMP
c 12 VARCHAR
a 4 INT
g 12 TEXT
b 12 VARCHAR
d 12 VARCHAR
f 12 BLOB

Thanks for bringing this up, however!

Patrick

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org