Repository navigation
Commit d5696b8
committed
Fix GH-24372: Keep stmt->executed set across PDOStatement::execute()
11690db cleared stmt->executed on entry to execute() so a failed
execute() could not leave the previous result fetchable. Drivers read that
flag as "executed successfully at least once": pdo_oci reallocates its
column buffers when it is clear, while PDO core skips describing the
columns again because they are still set, so the OCI defines keep writing
into the freed buffers; pdo_ibm leaks its column descriptors. Record the
failed execute() in a separate bit instead. The cursor closer still runs
on entry, but drivers without one are no longer drained, which also made
them fetch every remaining row on each re-execute.
Fixes GH-24372
Closes GH-243791 parent 2998188 commit d5696b8
2 files changed
Lines changed: 7 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | 394 | | |
418 | 395 | | |
419 | 396 | | |
| |||
430 | 407 | | |
431 | 408 | | |
432 | 409 | | |
433 | | - | |
434 | | - | |
| 410 | + | |
| 411 | + | |
435 | 412 | | |
| 413 | + | |
436 | 414 | | |
437 | 415 | | |
438 | 416 | | |
| |||
499 | 477 | | |
500 | 478 | | |
501 | 479 | | |
| 480 | + | |
502 | 481 | | |
503 | 482 | | |
504 | 483 | | |
| |||
605 | 584 | | |
606 | 585 | | |
607 | 586 | | |
608 | | - | |
| 587 | + | |
609 | 588 | | |
610 | 589 | | |
611 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
571 | 572 | | |
572 | | - | |
| 573 | + | |
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
| |||
0 commit comments