Skip to content

Commit 9818874

Browse files
authored
Merge pull request #47577 from nextcloud/backport/47525/stable29
[stable29] fix: optimise `getWrongShareOwnership` query
2 parents 573a4b8 + e2a7575 commit 9818874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/Command/Maintenance/RepairShareOwnership.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected function getWrongShareOwnership(): array {
102102
$brokenShares = $qb
103103
->select('s.id', 'm.user_id', 's.uid_owner', 's.uid_initiator', 's.share_with', 's.file_target')
104104
->from('share', 's')
105-
->join('s', 'filecache', 'f', $qb->expr()->eq('s.item_source', $qb->expr()->castColumn('f.fileid', IQueryBuilder::PARAM_STR)))
105+
->join('s', 'filecache', 'f', $qb->expr()->eq($qb->expr()->castColumn('s.item_source', IQueryBuilder::PARAM_INT), 'f.fileid'))
106106
->join('s', 'mounts', 'm', $qb->expr()->eq('f.storage', 'm.storage_id'))
107107
->where($qb->expr()->neq('m.user_id', 's.uid_owner'))
108108
->andWhere($qb->expr()->eq($qb->func()->concat($qb->expr()->literal('/'), 'm.user_id', $qb->expr()->literal('/')), 'm.mount_point'))

0 commit comments

Comments
 (0)