fix: make getMountsForFileId work with sharding again

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2026-01-29 16:57:31 +01:00 committed by Benjamin Gaussorgues
parent 9590a7b801
commit e00b60b89c
No known key found for this signature in database

View file

@ -383,7 +383,7 @@ class UserMountCache implements IUserMountCache {
->from('mounts', 'm')
->innerJoin('m', 'filecache', 'f', $builder->expr()->eq('m.root_id', 'f.fileid'))
->where($builder->expr()->eq('m.storage_id', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->andWhere($builder->expr()->eq('m.storage_id', 'f.storage')) # Hint for DBs
->andWhere($builder->expr()->eq('f.storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->andWhere(
$builder->expr()->orX(
$builder->expr()->eq('f.fileid', $builder->createNamedParameter($fileId)),