[MDEV-4919] Packets out of order on a SELECT after calling a procedure with DELETE .. RETURNING Created: 2013-08-18 Updated: 2013-08-22 Resolved: 2013-08-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 10.0.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The "Lost connection ..." error does not signify a server crash, only that the client got disconnected:
bzr version-info
|
| Comments |
| Comment by Sergei Petrunia [ 2013-08-21 ] |
|
I have created a stored procedure P2() which is the same like the procedure P in the testcase, except that it has "SELECT * FROM t2" instead of DELETE ... RETURNING. When I debug two statements, I observe these differences: in mysql_execute_command(), sql_parse.cc:4354: P: if sp_head::MULTI_RESULTS is set, then the code right below sets SERVER_MORE_RESULTS_EXISTS in thd->server_status. This affects further execution. I've put breakpoints in relevant places: P2: P: |
| Comment by Sergei Petrunia [ 2013-08-21 ] |
|
This shows the error: when we run procedure P, we call send_eof() without SERVER_MORE_RESULTS_EXISTS. The client will get the EOF message and will not expect any further data. However, the server will later call send_ok(), which will cause client server protocol to go out of sync. |
| Comment by Sergei Petrunia [ 2013-08-21 ] |
|
Committed a patch |
| Comment by Sergei Petrunia [ 2013-08-22 ] |
|
Fix pushed to 10.0-base |