]> source.dussan.org Git - nextcloud-server.git/commitdiff
Temporary fix contacts search 20720/head
authorJoas Schilling <coding@schilljs.com>
Wed, 29 Apr 2020 12:48:41 +0000 (14:48 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 29 Apr 2020 12:48:41 +0000 (14:48 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/dav/lib/CardDAV/CardDavBackend.php

index 6081ac31be3540e54ca62f6c764395c6ec1d02cf..a5d507629223897846837e414d42780f9e540184 100644 (file)
@@ -966,12 +966,14 @@ class CardDavBackend implements BackendInterface, SyncSupport {
                                $query2->andWhere($query2->expr()->ilike('cp.value', $query->createNamedParameter('%' . $this->db->escapeLikeParameter($pattern) . '%')));
                        }
                }
-               if (isset($options['limit'])) {
-                       $query2->setMaxResults($options['limit']);
-               }
-               if (isset($options['offset'])) {
-                       $query2->setFirstResult($options['offset']);
-               }
+//             // 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'
+//             // FIXME Should use 2 queries instead
+//             if (isset($options['limit'])) {
+//                     $query2->setMaxResults($options['limit']);
+//             }
+//             if (isset($options['offset'])) {
+//                     $query2->setFirstResult($options['offset']);
+//             }
 
                $query->select('c.carddata', 'c.uri')->from($this->dbCardsTable, 'c')
                        ->where($query->expr()->in('c.id', $query->createFunction($query2->getSQL())));