From ca8e0b9aba70bea507a6b3ef29a951cffce63bae Mon Sep 17 00:00:00 2001 From: michalsn Date: Fri, 20 Sep 2024 08:12:44 +0200 Subject: [PATCH] update skipLocked() method for OCI8 --- src/Models/QueueJobModel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Models/QueueJobModel.php b/src/Models/QueueJobModel.php index 9523684..adf6742 100644 --- a/src/Models/QueueJobModel.php +++ b/src/Models/QueueJobModel.php @@ -101,7 +101,8 @@ private function skipLocked(string $sql): string } if ($this->db->DBDriver === 'OCI8') { - $sql = "SELECT * FROM ({$sql}) subquery"; + $sql = preg_replace('/ OFFSET .*/', '', $sql); + $sql = "SELECT * FROM ({$sql}) WHERE ROWNUM = 1"; } return $sql .= ' FOR UPDATE SKIP LOCKED';