]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also use hashed/indexed column on delete 31398/head
authorJoas Schilling <coding@schilljs.com>
Wed, 2 Mar 2022 08:23:16 +0000 (09:23 +0100)
committerJoas Schilling <coding@schilljs.com>
Wed, 2 Mar 2022 08:23:16 +0000 (09:23 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/BackgroundJob/JobList.php

index 16dfa7b58a6464cc23f3f8d07185e5a0ec47b8ab..67caea62af07e1babe5b6eaada8f6feac0b1fa45 100644 (file)
@@ -111,8 +111,8 @@ class JobList implements IJobList {
                $query->delete('jobs')
                        ->where($query->expr()->eq('class', $query->createNamedParameter($class)));
                if (!is_null($argument)) {
-                       $argument = json_encode($argument);
-                       $query->andWhere($query->expr()->eq('argument', $query->createNamedParameter($argument)));
+                       $argumentJson = json_encode($argument);
+                       $query->andWhere($query->expr()->eq('argument_hash', $query->createNamedParameter(md5($argumentJson))));
                }
                $query->execute();
        }