Skip to content

Commit

Permalink
pbackup: Remove unused colums from a query
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Apr 8, 2025
1 parent e399cb2 commit 766d314
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/pbackup
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ sub do_a_job {
my $sth;
if ($type eq 'F') {
$sth = $dbh->prepare('
SELECT job_id, job_name, job_ok, job_started, path_server, path_path,
SELECT job_id, job_name, path_server, path_path,
CASE WHEN job_ok THEN job_started - ? ELSE JOB_STARTED - ? END as due
FROM job
LEFT JOIN stat ON stat_job_id = job_id
Expand All @@ -512,7 +512,7 @@ ORDER BY due
');
} else {
$sth = $dbh->prepare('
SELECT job_id, job_name, job_ok, job_started, path_server, path_path,
SELECT job_id, job_name, path_server, path_path,
CASE WHEN job_ok THEN job_started - ? ELSE JOB_STARTED - ? END as due
FROM job
INNER JOIN path ON job_path_id = path_id
Expand All @@ -522,7 +522,7 @@ ORDER BY due
');
}
$sth->execute(time - 24 * 60 * 60, time - 8 * 60 * 60);
my ($job_id, $job_name, $job_ok, $job_started, $path_server, $path_path, $due);
my ($job_id, $job_name, $path_server, $path_path, $due);
my $datadir;
my $volume_id;
my $started = time;
Expand All @@ -533,7 +533,7 @@ ORDER BY due
$dbh->commit;
return 0;
}
($job_id, $job_name, $job_ok, $job_started, $path_server, $path_path, $due) = @$row;
($job_id, $job_name, $path_server, $path_path, $due) = @$row;
next if $nosys and $job_name =~ /^sys_/;
next unless lck_can_lock("SERVER.$path_server", LCK_EX);
next unless lck_can_lock("JOB.$job_name", LCK_EX);
Expand Down

0 comments on commit 766d314

Please sign in to comment.