[MDEV-13287] Wrong sequence number when retrieving resultset for prepared statement Created: 2017-07-10 Updated: 2017-08-08 Resolved: 2017-08-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.1.24 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Rui Pacheco | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OSX |
||
| Description |
|
I'm trying to implement a client for MariaDB in C++. I've gotten most of it done but came across a curious issue with prepared statements. I have a local installation of the Sakila database. I prepare a statement using COM_STMT_PREPARE: "select * from actor where actor_id=?". Once I parse the output of that, I issue a COM_STMT_EXECUTE, by passing the value 200 as actor_id. This is where the bug seems to be. If you notice, what I labelled "Packet 07" and the following EOF seem to have the wrong sequence numbers, they jump from 6 to 10 and continue normally to 11. I get the following byte array, which I broke down into what I believe are individual packets: // Packet 01 // Packet 02 // Packet 03 // Packet 04 // Packet 05 // Packet 06 // Packet 07 [287] = '\x05' |
| Comments |
| Comment by Daniel Black [ 2017-07-11 ] |
|
What client library and versio n are you using? Are you able to provide your code? |
| Comment by Rui Pacheco [ 2017-07-11 ] |
|
This seems to be caused by Xcode printing the wrong values to it's console. I used socat to listen to the socket between my program and the server and the hexadecimal values displayed are much saner. |
| Comment by Elena Stepanova [ 2017-08-08 ] |
|
So, we can assume there is no problem on MariaDB side here, right? |
| Comment by Rui Pacheco [ 2017-08-08 ] |
|
I tried closing this ticket but don't think I had permissions. The database works as expected. |