diff options
author | Hamza <40746210+hamza221@users.noreply.github.com> | 2024-08-28 16:14:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 16:14:56 +0200 |
commit | 54bfe5174fada49b794f4cdd27b2a3d1f3ba7604 (patch) | |
tree | 532a51480db653012c2de6b262b6be10fee4e71a | |
parent | 8290b1e92ecda90474afc7c450656182dab35e02 (diff) | |
parent | 6361edb8641cc38bac66f1cd19f9b1b58621c9ea (diff) | |
download | nextcloud-server-54bfe5174fada49b794f4cdd27b2a3d1f3ba7604.tar.gz nextcloud-server-54bfe5174fada49b794f4cdd27b2a3d1f3ba7604.zip |
Merge pull request #47525 from nextcloud/fix/optimize-getWrongShareOwnership-query
fix: optimise `getWrongShareOwnership` query
-rw-r--r-- | core/Command/Maintenance/RepairShareOwnership.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Command/Maintenance/RepairShareOwnership.php b/core/Command/Maintenance/RepairShareOwnership.php index 71bc50b0bb8..a24be53b00e 100644 --- a/core/Command/Maintenance/RepairShareOwnership.php +++ b/core/Command/Maintenance/RepairShareOwnership.php @@ -85,7 +85,7 @@ class RepairShareOwnership extends Command { $brokenShares = $qb ->select('s.id', 'm.user_id', 's.uid_owner', 's.uid_initiator', 's.share_with', 's.file_target') ->from('share', 's') - ->join('s', 'filecache', 'f', $qb->expr()->eq('s.item_source', $qb->expr()->castColumn('f.fileid', IQueryBuilder::PARAM_STR))) + ->join('s', 'filecache', 'f', $qb->expr()->eq($qb->expr()->castColumn('s.item_source', IQueryBuilder::PARAM_INT), 'f.fileid')) ->join('s', 'mounts', 'm', $qb->expr()->eq('f.storage', 'm.storage_id')) ->where($qb->expr()->neq('m.user_id', 's.uid_owner')) ->andWhere($qb->expr()->eq($qb->func()->concat($qb->expr()->literal('/'), 'm.user_id', $qb->expr()->literal('/')), 'm.mount_point')) |