Primary/unique key cache now caches by $table->sql_name instead of
$table.
Failure to do so returned the wrong keys for the same table name in
multi-db_schema dumps.
sub _mysql_table_get_keys {
my ($self, $table) = @_;
- if(!exists($self->{_cache}->{_mysql_keys}->{$table})) {
+ if(!exists($self->{_cache}->{_mysql_keys}->{$table->sql_name})) {
my %keydata;
my $sth = $self->dbh->prepare('SHOW INDEX FROM '.$table->sql_name);
$sth->execute;
@{$keydata{$keyname}};
$keydata{$keyname} = \@ordered_cols;
}
- $self->{_cache}->{_mysql_keys}->{$table} = \%keydata;
+ $self->{_cache}->{_mysql_keys}->{$table->sql_name} = \%keydata;
}
- return $self->{_cache}->{_mysql_keys}->{$table};
+ return $self->{_cache}->{_mysql_keys}->{$table->sql_name};
}
sub _table_pk_info {