mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 20:57:53 +00:00
parallel: Fixed SQL racing error.
If two workers both work on the last job, the master will drop the table when the first returns. The second should ignore the dropped table.
This commit is contained in:
parent
29a7113d7f
commit
1117140adb
|
@ -10194,7 +10194,8 @@ sub get {
|
|||
my $self = shift;
|
||||
my $sth = $self->run(@_);
|
||||
my @retval;
|
||||
while(1) {
|
||||
# If $sth = 0 it means the table was dropped by another process
|
||||
while($sth) {
|
||||
my @row = $sth->fetchrow_array();
|
||||
@row or last;
|
||||
push @retval, \@row;
|
||||
|
|
Loading…
Reference in a new issue