Merge fix-undef-arrayref-bug-995274.

This commit is contained in:
Daniel Nichter
2012-05-08 17:02:58 -06:00
5 changed files with 144 additions and 4 deletions

View File

@@ -3999,7 +3999,11 @@ sub get_row_estimate {
PTDEBUG && _d($sql);
my $expl = $cxn->dbh()->selectrow_hashref($sql);
PTDEBUG && _d(Dumper($expl));
return ($expl->{rows} || 0), $expl->{key};
my $mysql_index = $expl->{key} || '';
if ( $mysql_index ne 'PRIMARY' ) {
$mysql_index = lc($mysql_index);
}
return ($expl->{rows} || 0), $mysql_index;
}
sub _prepare_sths {