Merge pull request #10762 from nextcloud/backport/10260/improved-sql-for-fetching-quota

[stable13] Use the path_hash instead of the path to query the filecache
This commit is contained in:
blizzz 2018-08-20 15:24:39 +02:00 committed by GitHub
commit d0f8a431c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ class UserMountCache implements IUserMountCache {
->innerJoin('m', 'filecache', 'f',
$builder->expr()->andX(
$builder->expr()->eq('m.storage_id', 'f.storage'),
$builder->expr()->eq('f.path', $builder->createNamedParameter('files'))
$builder->expr()->eq('f.path_hash', $builder->createNamedParameter(md5('files')))
))
->where($builder->expr()->eq('m.mount_point', $mountPoint))
->andWhere($builder->expr()->in('m.user_id', $builder->createNamedParameter($userIds, IQueryBuilder::PARAM_STR_ARRAY)));