Skip to content

Commit 2df57b2

Browse files
authored
Merge pull request #20720 from nextcloud/bugfix/noid/temporary-fix-contacts-search
Temporary fix contacts search
2 parents 523a8ba + f662d36 commit 2df57b2

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

apps/dav/lib/CardDAV/CardDavBackend.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -966,12 +966,14 @@ public function search($addressBookId, $pattern, $searchProperties, $options = [
966966
$query2->andWhere($query2->expr()->ilike('cp.value', $query->createNamedParameter('%' . $this->db->escapeLikeParameter($pattern) . '%')));
967967
}
968968
}
969-
if (isset($options['limit'])) {
970-
$query2->setMaxResults($options['limit']);
971-
}
972-
if (isset($options['offset'])) {
973-
$query2->setFirstResult($options['offset']);
974-
}
969+
// // FIXME Broken on MySQL: SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
970+
// // FIXME Should use 2 queries instead
971+
// if (isset($options['limit'])) {
972+
// $query2->setMaxResults($options['limit']);
973+
// }
974+
// if (isset($options['offset'])) {
975+
// $query2->setFirstResult($options['offset']);
976+
// }
975977

976978
$query->select('c.carddata', 'c.uri')->from($this->dbCardsTable, 'c')
977979
->where($query->expr()->in('c.id', $query->createFunction($query2->getSQL())));

0 commit comments

Comments
 (0)