Details
Description
1. create prepared insert
2. Execute it using encoded_plan and name - It fails
3. Execute it using only name - fails too.
Ketakis-MacBook-Pro:testrunner ketaki$ curl -v http://172.23.106.241:8093/query/service -d 'statement=prepare fave10 from insert into default(key,value) values("4","a"),("5", "b");'
|
* About to connect() to 172.23.106.241 port 8093 (#0)
|
* Trying 172.23.106.241...
|
* Adding handle: conn: 0x7ff171803a00
|
* Adding handle: send: 0
|
* Adding handle: recv: 0
|
* Curl_addHandleToPipeline: length: 1
|
* - Conn 0 (0x7ff171803a00) send_pipe: 1, recv_pipe: 0
|
* Connected to 172.23.106.241 (172.23.106.241) port 8093 (#0)
|
> POST /query/service HTTP/1.1
|
> User-Agent: curl/7.30.0
|
> Host: 172.23.106.241:8093
|
> Accept: */*
|
> Content-Length: 88
|
> Content-Type: application/x-www-form-urlencoded
|
>
|
* upload completely sent off: 88 out of 88 bytes
|
< HTTP/1.1 200 OK
|
< Content-Length: 2720
|
< Content-Type: application/json; version=1.0.0
|
< Date: Fri, 25 Sep 2015 17:28:16 GMT
|
<
|
{
|
"requestID": "cf3f287d-bf3f-496c-bbe7-3a849c5eea74",
|
"signature": "json",
|
"results": [
|
{
|
"encoded_plan": "H4sIAAAJbogA/5xRwUrDQBD9lWW8tLAHFb3kJnjxJgS8NEXG7LRdnOzGyW5RS/x2J4lVm2MhkHnDey9vXg5AoY6O3HPLGKAAsBCwIZ02uKerS8WxJcEUBYoDXPwBKOktq5qU8lXvPDshdVidku5y2kXxnwNrJJ3l8oScqaw1oYX9MHe6XK0quKnAmgqwgrU1im8n/KJ4Db09dXlEQWbi30+dlaWk4B5CR5KUhuxxyOJog5mHzSt9dC3WdLJk3/gERcjMU79zyjzqve9qFAf9utfHQit+75m2w+GHo6o4qovrfm5QJiFsYBR3fhswZaFjgkTvKlJTalHITH/abCQ2xo+X6StF82O/0JPs2PrSTOUvpuLH3pd28b/2JfTfAQAA//+/e69cVAIAAA==",
|
"name": "fave10",
|
"operator": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "Authorize",
|
"child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "ValueScan",
|
"values": "[[\"4\", \"a\"], [\"5\", \"b\"]]"
|
},
|
{
|
"#operator": "Parallel",
|
"~child": {
|
"#operator": "Sequence",
|
"~children": [
|
{
|
"#operator": "SendInsert",
|
"alias": "default",
|
"keyspace": "default",
|
"limit": null,
|
"namespace": "default"
|
},
|
{
|
"#operator": "Discard"
|
}
|
]
|
}
|
}
|
]
|
},
|
"privileges": {
|
"default:default": 2
|
}
|
},
|
{
|
"#operator": "Stream"
|
}
|
]
|
},
|
"signature": null,
|
"text": "prepare fave10 from insert into default(key,value) values(\"4\",\"a\"),(\"5\", \"b\")"
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "6.634185ms",
|
"executionTime": "6.537869ms",
|
"resultCount": 1,
|
"resultSize": 2424
|
}
|
}
|
From encoded_plan
Ketakis-MacBook-Pro:testrunner ketaki$ curl -v http://172.23.106.241:8093/query/service -H "Content-Type: application/json" -d '{ "prepared":"fave10", "encoded_plan":"H4sIAAAJbogA/5xRwUrDQBD9lWW8tLAHFb3kJnjxJgS8NEXG7LRdnOzGyW5RS/x2J4lVm2MhkHnDey9vXg5AoY6O3HPLGKAAsBCwIZ02uKerS8WxJcEUBYoDXPwBKOktq5qU8lXvPDshdVidku5y2kXxnwNrJJ3l8oScqaw1oYX9MHe6XK0quKnAmgqwgrU1im8n/KJ4Db09dXlEQWbi30+dlaWk4B5CR5KUhuxxyOJog5mHzSt9dC3WdLJk3/gERcjMU79zyjzqve9qFAf9utfHQit+75m2w+GHo6o4qovrfm5QJiFsYBR3fhswZaFjgkTvKlJTalHITH/abCQ2xo+X6StF82O/0JPs2PrSTOUvpuLH3pd28b/2JfTfAQAA//+/e69cVAIAAA==" }'
|
* About to connect() to 172.23.106.241 port 8093 (#0)
|
* Trying 172.23.106.241...
|
* Adding handle: conn: 0x7fef6c003a00
|
* Adding handle: send: 0
|
* Adding handle: recv: 0
|
* Curl_addHandleToPipeline: length: 1
|
* - Conn 0 (0x7fef6c003a00) send_pipe: 1, recv_pipe: 0
|
* Connected to 172.23.106.241 (172.23.106.241) port 8093 (#0)
|
> POST /query/service HTTP/1.1
|
> User-Agent: curl/7.30.0
|
> Host: 172.23.106.241:8093
|
> Accept: */*
|
> Content-Type: application/json
|
> Content-Length: 442
|
>
|
* upload completely sent off: 442 out of 442 bytes
|
< HTTP/1.1 500 Internal Server Error
|
< Content-Length: 476
|
< Content-Type: application/json; version=1.0.0
|
< Date: Fri, 25 Sep 2015 17:29:07 GMT
|
<
|
{
|
"requestID": "7265a07f-909d-476b-aa90-d1d4662ed660",
|
"errors": [
|
{
|
"code": 4070,
|
"msg": "Unable to decode prepared statement - cause: Unrecognizable prepared statement - cause: unable to convert to prepared statment."
|
}
|
],
|
"status": "fatal",
|
"metrics": {
|
"elapsedTime": "121.656µs",
|
"executionTime": "117.355µs",
|
"resultCount": 0,
|
"resultSize": 0,
|
"errorCount": 1
|
}
|
}
|
|
Attachments
For Gerrit Dashboard: MB-16370 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
55547,2 | Ensure Insert statement is correctly marshalled. MB-16370. | master | query | Status: MERGED | +2 | +1 |
55570,2 | Ensure Insert statement is correctly marshalled. MB-16370. | 4.1.0 | query | Status: MERGED | +2 | +1 |