Below is the list of changes that have just been committed into a local
5.1 repository of mtaylor. When mtaylor does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-05-25 11:48:21-07:00, mtaylor@qualinost.(none) +1 -0
Added support for setting an optional "real_table_name" for a table to deal with unique indexe size calcs.
storage/ndb/tools/ndb_size.pl@stripped, 2007-05-25 11:48:19-07:00, mtaylor@qualinost.(none) +17 -4
Added support for setting an optional "real_table_name" for a table to deal with unique indexe size calcs.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mtaylor
# Host: qualinost.(none)
# Root: /home/mtaylor/src/mysql/mysql-5.1-new-maint
--- 1.11/storage/ndb/tools/ndb_size.pl 2007-05-25 11:48:30 -07:00
+++ 1.12/storage/ndb/tools/ndb_size.pl 2007-05-25 11:48:30 -07:00
@@ -170,7 +170,8 @@
ddm_versions ) ],
scalar => [ qw( name
rows
- schema) ],
+ schema
+ real_table_name) ],
hash => [ qw( columns
indexes
indexed_columns
@@ -199,6 +200,16 @@
scalar => [ { -default=> 4 },'align'],
];
+sub table_name
+{
+ my ($self) = @_;
+ if ($self->real_table_name) {
+ return $self->real_table_name;
+ }else {
+ return $self->name;
+ }
+}
+
sub compute_row_size
{
my ($self, $releases) = @_;
@@ -586,7 +597,7 @@
{
my $sql= "select avg(length(`"
.$colname
- ."`)) from `".$t->schema().'`.`'.$t->name().'`';
+ ."`)) from `".$t->schema().'`.`'.$t->table_name().'`';
my @dynamic;
if($loadqueries)
{
@@ -616,7 +627,7 @@
my $sql= "select SUM(CEILING(".
"length(`$colname`)/$blobhunk))"
- ."from `".$t->schema().'`.`'.$t->name()."`";
+ ."from `".$t->schema().'`.`'.$t->table_name()."`";
my @blobsize;
if($loadqueries)
{
@@ -674,7 +685,8 @@
$col->size($size);
$t->columns_set( $colname => $col );
}
- #print "setting tables: ",$t->schema(), $t->name(), $t->name,"\n";
+ #print "setting tables: ",$t->schema(), $t->table_name(), $t->name, $t->real_table_name || "" , "\n";
+ # Use $t->name here instead of $t->table_name() to avoid namespace conflicts
$report->tables_set( $t->schema().".".$t->name() => $t );
# And now... the IndexMemory usage.
@@ -777,6 +789,7 @@
foreach @{$indexes{$index}{columns}};
my $st= new MySQL::NDB::Size::Table(name => $idxname,
+ real_table_name => $t->table_name(),
rows => $count[0],
schema => $t->schema(),
row_dm_overhead =>
| Thread |
|---|
| • bk commit into 5.1 tree (mtaylor:1.2507) | Monty Taylor | 25 May |