Can only SKIP LOCKED if locking rows. Remove FOR SHARE as it isn't supported on < mysql 8
This commit is contained in:
parent
cca7953856
commit
4fa804e9a2
|
@ -413,13 +413,11 @@ sub Sql {
|
||||||
$sql .= ' LIMIT 0,'.$filter_expr->{limit};
|
$sql .= ' LIMIT 0,'.$filter_expr->{limit};
|
||||||
}
|
}
|
||||||
if ($$self{LockRows}) {
|
if ($$self{LockRows}) {
|
||||||
$sql .= ' FOR UPDATE OF E'
|
$sql .= ' FOR UPDATE'
|
||||||
} else {
|
|
||||||
$sql .= ' FOR SHARE OF E'
|
|
||||||
}
|
|
||||||
if ($filter_expr->{skip_locked}) {
|
if ($filter_expr->{skip_locked}) {
|
||||||
$sql .= ' SKIP LOCKED';
|
$sql .= ' SKIP LOCKED';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$self->{Sql} = $sql;
|
$self->{Sql} = $sql;
|
||||||
} # end if has Sql
|
} # end if has Sql
|
||||||
return $self->{Sql};
|
return $self->{Sql};
|
||||||
|
|
Loading…
Reference in New Issue