Skip to content

Commit

Permalink
Merge pull request #10260 from nextcloud/bugfix/7974/improved-sql-for…
Browse files Browse the repository at this point in the history
…-fetching-quota

Use the path_hash instead of the path to query the filecache
  • Loading branch information
MorrisJobke committed Jul 17, 2018
2 parents a155f80 + 19c49c8 commit a7adc4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Config/UserMountCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public function getUsedSpaceForUsers(array $users) {
->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)));
Expand Down

0 comments on commit a7adc4c

Please sign in to comment.