Fix bug: a typo in NibbleIterator::_find_best_index().

This commit is contained in:
Daniel Nichter
2013-07-10 10:23:28 -07:00
parent 89524dbefa
commit 51e476c6a2
2 changed files with 2 additions and 5 deletions

View File

@@ -554,7 +554,7 @@ sub _find_best_index {
@possible_indexes = sort {
# Prefer the index with the highest cardinality.
my $cmp
= $indexes->{$b}->{cardinality} <=> $indexes->{$b}->{cardinality};
= $indexes->{$b}->{cardinality} <=> $indexes->{$a}->{cardinality};
if ( $cmp == 0 ) {
# Indexes have the same cardinality; prefer the one with
# more columns.

View File

@@ -38,9 +38,6 @@ my $dbh = $sb->get_dbh_for('master');
if ( !$dbh ) {
plan skip_all => 'Cannot connect to sandbox master';
}
else {
plan tests => 54;
}
my $q = new Quoter();
my $tp = new TableParser(Quoter=>$q);
@@ -866,4 +863,4 @@ like(
);
$sb->wipe_clean($dbh);
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");
exit;
done_testing;