From 4fa804e9a28f95e534d2e076547a35d053f375d7 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 14 Dec 2021 13:33:00 -0500 Subject: [PATCH] Can only SKIP LOCKED if locking rows. Remove FOR SHARE as it isn't supported on < mysql 8 --- scripts/ZoneMinder/lib/ZoneMinder/Filter.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm b/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm index 7b3efad46..f483e545c 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm @@ -413,12 +413,10 @@ sub Sql { $sql .= ' LIMIT 0,'.$filter_expr->{limit}; } if ($$self{LockRows}) { - $sql .= ' FOR UPDATE OF E' - } else { - $sql .= ' FOR SHARE OF E' - } - if ($filter_expr->{skip_locked}) { - $sql .= ' SKIP LOCKED'; + $sql .= ' FOR UPDATE' + if ($filter_expr->{skip_locked}) { + $sql .= ' SKIP LOCKED'; + } } $self->{Sql} = $sql; } # end if has Sql