ResultSet contains different amount of coloums

Bug #1032888 reported by Mohit Srivastava
6
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://localhost:8086/sql
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.

Revision history for this message
Henrik Ingo (hingo) wrote :

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.

tags: added: execute-api json-server
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.