Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.5.0
Description
Repro: Create default bucket
No indexes
curl -v -u Administrator:password http://localhost:8093/query/service -d 'statement=select * from default where foo="bar"' |
* Trying ::1... |
* TCP_NODELAY set
|
* Connected to localhost (::1) port 8093 (#0) |
* Server auth using Basic with user 'Administrator' |
> POST /query/service HTTP/1.1 |
> Host: localhost:8093 |
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
|
> User-Agent: curl/7.54.0 |
> Accept: */*
|
> Content-Length: 47 |
> Content-Type: application/x-www-form-urlencoded
|
>
|
* upload completely sent off: 47 out of 47 bytes |
< HTTP/1.1 404 Not Found |
< Content-Length: 401 |
< Content-Type: application/json; version=2.0.0-N1QL |
< Date: Mon, 10 Jun 2019 18:24:36 GMT |
<
|
{
|
"requestID": "a0274f09-d29d-4fc1-b383-8475b1e41ebf", |
"errors": [{"code":4000,"msg":"No index available on keyspace default that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online."}], |
"status": "fatal", |
"metrics": {"elapsedTime": "5.103546ms","executionTime": "5.070466ms","resultCount": 0,"resultSize": 0,"errorCount": 1} |
}
|
|
curl -v -u Administrator:password http://localhost:8093/query/service -d 'statement=select * from default use keys (select * from default where foo="bar")' |
* Trying ::1... |
* TCP_NODELAY set
|
* Connected to localhost (::1) port 8093 (#0) |
* Server auth using Basic with user 'Administrator' |
> POST /query/service HTTP/1.1 |
> Host: localhost:8093 |
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
|
> User-Agent: curl/7.54.0 |
> Accept: */*
|
> Content-Length: 80 |
> Content-Type: application/x-www-form-urlencoded
|
>
|
* upload completely sent off: 80 out of 80 bytes |
< HTTP/1.1 200 OK |
< Content-Length: 474 |
< Content-Type: application/json; version=2.0.0-N1QL |
< Date: Mon, 10 Jun 2019 18:26:00 GMT |
<
|
{
|
"requestID": "c7dffd45-0c65-434a-9fcd-3aeff031551e", |
"signature": {"*":"*"}, |
"results": [ |
],
|
"errors": [{"code":5010,"msg":"Error evaluating KEYS. - cause: No index available on keyspace default that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online."}], |
"status": "errors", |
"metrics": {"elapsedTime": "6.661156ms","executionTime": "6.606347ms","resultCount": 0,"resultSize": 0,"errorCount": 1} |
}
|
Why did first curl statement gives HTTP/1.1 404 Not Found
second curl statement gives HTTP/1.1 200 OK
Investigate we set 200 OK or error. (Is first statement we never reached execution. Second statement we reached execution phase and error occurred, once execution started we might be streamed partial results so we set 200 OK?)?
Attachments
Issue Links
- relates to
-
MB-34503 [5.5.5 Backport] - N1QL exception not bring propagated
- Closed