Details
-
Bug
-
Resolution: Fixed
-
Critical
-
4.0.0
-
Security Level: Public
-
Untriaged
-
Unknown
Description
Currently, the code 5000 is used for an index not found condition. It would be preferable to return this specific code:
https://github.com/couchbase/query/blob/master/errors/ds_couchbase.go#L106
given that this will occur if the indexes used by a prepared statement are deleted/unavailable. See the sequence below for an example.
cbq> prepare foo as select name, callsign from `travel-sample` where icao = "CAN"
cbq> drop index `travel-sample`.def_icao;
cbq> execute foo ;
{
"requestID": "2ddd790a-9416-465b-b201-344e79f3f45c",
"signature": null,
"results": [
],
"errors": [
],
"status": "errors",
"metrics":
}