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

Patrick Galbraith <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
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/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.