Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.0
-
Security Level: Public
-
None
-
CBG Sprint 97
-
1
Description
On Sync Gateway/3.0.0(541;46803d1),
invoking server:4985/bucketname/_user/ gets the following error
{ "error": "Internal Server Error", |
"reason":"Internal error: parsing failure | {\"statement\":\"SELECT META(`bucketname`).id FROM `bucketname` USE INDEX(sg_syncDocs_x1) WHERE META(`bucketname`).id LIKE '\\\\\\\\_sync:%' AND (META(`ipc-20002-prod`).id LIKE '\\\\\\\\_sync:user:%' OR META(`ipc-20002-prod`).id LIKE '\\\\\\\\_sync:role:%') ORDER BY META(`bucketname`).id LIMIT 5000 AND META(`bucketname`).id \>= $startkey\",\"client_context_id\":\"9c00aeff-43eb-40e3-a130-4f53c4a79b3b\",\"errors\":[{\"Code\":3000,\"Message\":\"Ambiguous reference to field ipc-20002-prod.\"}]}" } |
|
The query
SELECT META(`bucketname`).id
FROM `bucketname` USE INDEX(sg_syncDocs_x1)
WHERE META(`bucketname`).id LIKE '
_sync:%'
AND (META(`bucketname`).id LIKE '
_sync:user:%'
OR META(`bucketname`).id LIKE '
_sync:role:%')
ORDER BY META(`bucketname`).id
LIMIT 5000
AND META(`bucketname`).id >= $startkey
is malformed (if last "AND" condition is properly moved within the WHERE clause, it works).