ndb_size.pl:

fix incorrect quoting of column name


ndb/tools/ndb_size.pl:
  fix incorrect quoting of column name
This commit is contained in:
unknown 2005-11-29 14:55:26 +01:00
commit db2c1beec1

View file

@ -146,9 +146,9 @@ foreach(@{$tables})
elsif($type =~ /varchar/ || $type =~ /varbinary/) elsif($type =~ /varchar/ || $type =~ /varbinary/)
{ {
my $fixed= 1+$size; my $fixed= 1+$size;
my @dynamic=$dbh->selectrow_array("select avg(length(" my @dynamic=$dbh->selectrow_array("select avg(length(`"
.$dbh->quote($name) .$name.
.")) from `".$table.'`'); ."`)) from `".$table.'`');
$dynamic[0]=0 if !$dynamic[0]; $dynamic[0]=0 if !$dynamic[0];
@realsize= ($fixed,$fixed,ceil($dynamic[0])); @realsize= ($fixed,$fixed,ceil($dynamic[0]));
} }