fixed some typos

This commit is contained in:
hjp 2010-09-02 11:41:21 +00:00
parent 9c0af9a71e
commit 3a2570be8e
1 changed files with 6 additions and 4 deletions

View File

@ -155,9 +155,11 @@ sub backup2disk {
# XXX - lock fileset here, we don't want to backup the same fileset twice concurrently.
# theoretically something like
$self->{dbh}->selectall_arrayref(q{select * from filesets where id = ?}, {}, $target->{id});
$self->{dbh}->selectall_arrayref(q{select * from filesets where id = ? for update}, {}, $target->{id});
# should suffice, but I'm not sure if that blocks too much (does that block reads? block the whole table?)
# Just try it and we will see ...
# According to the manual this only works if autocommit is off, so it probably doesn't work on MyISAM
# anyway.
$self->log(3, "starting backup for target host " . $target->{host} . " dir " . $target->{dir});
$self->{target} = $target;
@ -591,13 +593,13 @@ sub linkdup {
unless ($self->{sessions_on_same_device}) {
my $st = stat($backup_filename);
my $my_dev = defined $st ? $st->dev : ""; # can this happen?
my $sth = $self->{dbh}->prepare("select * sessions oder yb order by id desc");
my $sth = $self->{dbh}->prepare("select * from sessions order by id desc");
$sth->execute();
while (my $r = $sth->fetchrow_hashref()) {
my $st = lstat $r->{prefix};
my $dev = defined $st ? $st->dev : "";;
next unless $dev ne $my_dev;
last if @{ $self->{sessions_on_same_device} } > 30;
next unless $dev eq $my_dev;
last if $self->{sessions_on_same_device} && @{ $self->{sessions_on_same_device} } > 30;
push @{ $self->{sessions_on_same_device} }, $r;
}