Fix quote_val() calls in TableSyncNibble.pm by removing 2nd arg which was ignored anyway. Use more real tbl_struct in TableSyncGroupBy.t so auto-vivification doesn't cause sort_cols() to print the expected results. Remove have_all_privs() tests from TableSyncer.t.

This commit is contained in:
Daniel Nichter
2012-08-27 10:42:39 -06:00
parent b778ad4781
commit 3079f72935
3 changed files with 25 additions and 57 deletions

View File

@@ -286,7 +286,7 @@ sub __get_boundaries {
# any lower boundary the table rows should be > the lower boundary.)
my $i = 0;
$ub = $s->{boundaries}->{'<='};
$ub =~ s/\?/$q->quote_val($row->{$s->{scols}->[$i]}, $self->{tbl_struct}->{is_numeric}->{$s->{scols}->[$i++]} || 0)/eg;
$ub =~ s/\?/$q->quote_val($row->{$s->{scols}->[$i++]})/eg;
}
else {
# This usually happens at the end of the table, after we've nibbled
@@ -331,7 +331,7 @@ sub __make_boundary_sql {
my $tmp = $self->{cached_row};
my $i = 0;
$lb = $s->{boundaries}->{'>'};
$lb =~ s/\?/$q->quote_val($tmp->{$s->{scols}->[$i]}, $self->{tbl_struct}->{is_numeric}->{$s->{scols}->[$i++]} || 0)/eg;
$lb =~ s/\?/$q->quote_val($tmp->{$s->{scols}->[$i++]})/eg;
$sql .= $args{where} ? " AND $lb" : " WHERE $lb";
}
$sql .= " ORDER BY " . join(',', map { $q->quote($_) } @{$self->{key_cols}})