Details
Description
- Seen on a Sync Gateway test, which passes on CBS 6.6, but fails on 7.0.0 & 7.1.0
- Test attempts to introduce syntax error. Should return zero rows for user `user1`AND`, and not return error (could be any backtick, like `bruno``s-login`)
- Error msg:
parsing failure | {"statement":"SELECT meta(`sg_int_0_1643208795438309000`).xattrs._sync.access.`user1``AND` as `value` FROM `sg_int_0_1643208795438309000` USE INDEX (sg_access_x1) WHERE any op in object_pairs(meta(`sg_int_0_1643208795438309000`).xattrs._sync.access) satisfies op.name = $userName end;","client_context_id":"d8d6042d-59b9-4ec8-9f5f-1f32772a0d36","errors":[{"Code":3000,"Message":"syntax error: invalid escaped identifier - line 1, column 65, near 'xattrs._sync.access.', at: `user1``AND`"}],"http_status_code":400}
|
- Also validated by:
rpm -q -a | grep couch
|
couchbase-server-6.5.0-4960.x86_64
|
[root@localhost ~]# scb
|
Connected to : http://127.0.0.1:8093/. Type Ctrl-D or \QUIT to exit.
|
|
Path to history file for the shell : /root/.cbq_history
|
cbq> select d.`user1``AND` as b from [{"user1`AND":123} ] AS d;
|
{
|
"requestID": "08ee4e81-8493-440d-81ac-75f795fc0b92",
|
"signature": {
|
"b": "json"
|
},
|
"results": [
|
{
|
"b": 123
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "1.040523ms",
|
"executionTime": "935.489µs",
|
"resultCount": 1,
|
"resultSize": 24
|
}
|
}
|
cbq> select d.`user1``AND` as b from [{"user1`AND":123} ] AS d; |
{
|
"requestID": "165bc4d1-c745-4254-9e2b-7c6f6bf4d6cb", |
"errors": [ |
{
|
"code": 3000, |
"msg": "syntax error: invalid escaped identifier - line 1, column 10, near 'select d.', at: `user1``AND`" |
}
|
],
|
"status": "fatal", |
"metrics": { |
"elapsedTime": "861.935µs", |
"executionTime": "689.284µs", |
"resultCount": 0, |
"resultSize": 0, |
"serviceLoad": 6, |
"errorCount": 1 |
}
|
}
|
cbq> [root@localhost ~]# rpm -q -a | grep couchbase |
couchbase-server-7.1.0-2088.x86_64 |
|
Attachments
For Gerrit Dashboard: MB-50619 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
169575,3 | MB-50619 Revise MB-30176 fix. | master | query | Status: MERGED | +2 | +1 |
169676,3 | MB-50619 Additional fixes to ensure consistency with field look-up | master | query | Status: MERGED | +2 | +1 |