This repository was archived by the owner on Mar 1, 2026. It is now read-only.
Commit 339e3da
committed
Bug #25584097: MYSQL_STMT_CLOSE HANGS WHEN THE STATEMENT IS CANCELED WITH KILL QUERY
Two problems:
Problem1:
The client library was not handling killing a cursor producing
mysql_stmt_execute being killed.
Basically it was not copying the error from net into the prepared
statement's error area and was not resetting the state when trying to read the result
and failing. Hence, at close, the client was trying to read the rest of
the resultset and failing.
Fixed by properly handling the error condition.
Problem2:
The server side materialized cursor wasn't closed properly when a KILL was sent
while the statement was still running and did not receive all of the data from the
cursor.
Fixed by making sure the cursor is properly disposed of.
Test case added.
Change-Id: Iff8305972948c4239bead8bd08b11088289a297e1 parent 5430cd9 commit 339e3da
3 files changed
Lines changed: 88 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1760 | 1760 | | |
1761 | 1761 | | |
1762 | 1762 | | |
1763 | | - | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
1764 | 1767 | | |
| 1768 | + | |
1765 | 1769 | | |
1766 | 1770 | | |
1767 | 1771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3467 | 3467 | | |
3468 | 3468 | | |
3469 | 3469 | | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
3470 | 3479 | | |
3471 | 3480 | | |
3472 | 3481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
23283 | 23286 | | |
23284 | 23287 | | |
23285 | 23288 | | |
| 23289 | + | |
| 23290 | + | |
| 23291 | + | |
| 23292 | + | |
| 23293 | + | |
| 23294 | + | |
| 23295 | + | |
| 23296 | + | |
| 23297 | + | |
| 23298 | + | |
| 23299 | + | |
| 23300 | + | |
| 23301 | + | |
| 23302 | + | |
| 23303 | + | |
| 23304 | + | |
| 23305 | + | |
| 23306 | + | |
| 23307 | + | |
| 23308 | + | |
| 23309 | + | |
| 23310 | + | |
| 23311 | + | |
| 23312 | + | |
| 23313 | + | |
| 23314 | + | |
| 23315 | + | |
| 23316 | + | |
| 23317 | + | |
| 23318 | + | |
| 23319 | + | |
| 23320 | + | |
| 23321 | + | |
| 23322 | + | |
| 23323 | + | |
| 23324 | + | |
| 23325 | + | |
| 23326 | + | |
| 23327 | + | |
| 23328 | + | |
| 23329 | + | |
| 23330 | + | |
| 23331 | + | |
| 23332 | + | |
| 23333 | + | |
| 23334 | + | |
| 23335 | + | |
| 23336 | + | |
| 23337 | + | |
| 23338 | + | |
| 23339 | + | |
| 23340 | + | |
| 23341 | + | |
| 23342 | + | |
| 23343 | + | |
| 23344 | + | |
| 23345 | + | |
| 23346 | + | |
| 23347 | + | |
| 23348 | + | |
| 23349 | + | |
| 23350 | + | |
| 23351 | + | |
| 23352 | + | |
| 23353 | + | |
| 23354 | + | |
| 23355 | + | |
| 23356 | + | |
| 23357 | + | |
| 23358 | + | |
23286 | 23359 | | |
23287 | 23360 | | |
23288 | 23361 | | |
| |||
23596 | 23669 | | |
23597 | 23670 | | |
23598 | 23671 | | |
| 23672 | + | |
23599 | 23673 | | |
23600 | 23674 | | |
23601 | 23675 | | |
0 commit comments