Ollie Jones has asked for the wisdom of the Perl Monks concerning the following question:

Hello, dear Monks.

I am planning to use PERL DBI to do data transfer operations between Oracle (10g) and mySQL (5.1.41) table servers. I have the latest and greatest CPAN bits.

I hope to control some aspects of these operations by storing tags in table and column comments. For example I might put the string --ANONYMIZE-- into a table comment if my data transfer operation needs to randomize data from that particular table to sanitize it.

DBI offers some nicely designed database independent metadata access methods, for example the table_info method. The trouble is, this table_info method returns empty REMARK data for mySQL, whereas it correctly returns the table comment as REMARK data for Oracle.

I know how to use mySQL's information_schema to get exactly what I need. But I was hoping to do this in a, well, DBI (Data Base Independent) way. Am I out of luck? Or is there something I'm missing about the use of table_info? Thanks for any advice, and thanks for PERL.

  • Comment on PERL DBI access to mysql table_info metadata: table comments missing?

Replies are listed 'Best First'.
Re: PERL DBI access to mysql table_info metadata: table comments missing?
by Anonymous Monk on Jan 04, 2010 at 03:56 UTC
    Am I out of luck?

    Not really. I don't how table_info is supposed to work, so I'm not sure if this is a bug or not, but you need 1) newer database driver (DBD::mysql/DBD::mysqlPP ...), or 2) submit a bug report (or patch) for your database driver.

    Choose option that best fixes your problem :)