List:MySQL and Perl« Previous MessageNext Message »
From:Martin MOKREJŠ Date:November 11 2003 3:13pm
Subject:DBD-mysql-2.9003 quoting bug
View as plain text  
Hi,
  has anyone observed that DBD::mysql puts backticks aroun it's output?
This is somewhat new with this version, as I did not have to remove those
backticks with previous versions:

sub GetTables {
  my ($db) = @_;
  # $dbh->table_info()
  $| = 1;
  print "Info: [$user\@$host:$port $db]: Getting list of tables present ..." if ( $verbose
>= 2 );
  my @tables = map { $_ =~ s/.*\.//; $_ } $dbh->tables();
  if ( $DBI::errstr ) {
    print "failed.\n" if ( $verbose >= 2 );
    warn "Error: [$user\@$host:$port $db]: $DBI::errstr\n";
    return;
  } else {
    print " succeeded.\n" if ( $verbose >= 2 );
  }

  foreach ( @tables ) {
    s/\`//g;
    print "Debug: GetTables(): $db.$_\n" if ( $verbose >= 3 );
  }
  return @tables;
}

Please Cc: me in replies. Thanks.
-- 
Martin Mokrejs <mmokrejs@stripped>, <m.mokrejs@stripped>
PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs
MIPS / Institute for Bioinformatics <http://mips.gsf.de>
GSF - National Research Center for Environment and Health
Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany
tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
Thread
DBD-mysql-2.9003 quoting bugMartin MOKREJŠ11 Nov
  • Re: DBD-mysql-2.9003 quoting bugRudy Lippan11 Nov