ResultSet contains different amount of coloums
Bug #1032888 reported by
Mohit Srivastava
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
New
|
Undecided
|
Unassigned |
Bug Description
curl -X POST -d 'SELECT SLEEP(1000);SELECT _id from test.people;' http://
For this particular request , response is:
{
"query" : "SELECT SLEEP(1000);SELECT _id from test.people;",
"result_set" : [
[ "0" ],
[ "1" ]
],
"sqlstate" : "00000"
}
So, if select something that has only 1 column, then it will work.
but for more than that , segmentation fault.
To post a comment you must log in.
So to clarify with some more details:
The segmentation fault happens when there is an uneven amount of columns, such as:
curl -X POST -d 'SELECT 'foo';SELECT 'bar', 'baz';' http:// localhost: 8086/sql
This only happens when compiled with -O0. If compiled with -O2 things are inlined and the bug disappears.
I also checked the EXECUTE command in drizzle CLI. It doesn't allow to combine 2 SQL statements like this, so the issue doesn't arise.
The segmentation fault happens due to the way Execute API works, this is not a Json Server bug.