Repository navigation
Commit eceac27
committed
Build empty result sets without a TEMP table
Empty result sets used a no-op INSERT into a TEMP table that was created
on first use. When the first use happened in a transaction, for example
for START TRANSACTION itself, a rollback dropped the table, while the
driver still assumed it existed. Every later statement with an empty
result set then failed with "Table '_wp_sqlite_empty_result' doesn't
exist".
Use an unknown pragma instead. It has no columns, SQLite ignores it, and
it needs no table and takes no locks. PDO reports the row count of the
last write for it, but the driver reports 0 affected rows for all
statements other than DML.
Add regression tests for the rollback, and a test for the empty result
statement API.
See #5351 parent 432b350 commit eceac27
2 files changed
Lines changed: 82 additions & 41 deletions
File tree
- packages/mysql-on-sqlite
- src/sqlite
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | 85 | | |
92 | 86 | | |
93 | 87 | | |
| |||
678 | 672 | | |
679 | 673 | | |
680 | 674 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | 675 | | |
690 | 676 | | |
691 | 677 | | |
| |||
7756 | 7742 | | |
7757 | 7743 | | |
7758 | 7744 | | |
7759 | | - | |
7760 | | - | |
| 7745 | + | |
| 7746 | + | |
| 7747 | + | |
| 7748 | + | |
| 7749 | + | |
7761 | 7750 | | |
7762 | 7751 | | |
7763 | | - | |
7764 | | - | |
7765 | | - | |
7766 | | - | |
7767 | | - | |
7768 | | - | |
7769 | | - | |
7770 | | - | |
7771 | | - | |
7772 | | - | |
7773 | | - | |
7774 | | - | |
7775 | | - | |
7776 | | - | |
7777 | | - | |
7778 | | - | |
7779 | | - | |
7780 | | - | |
7781 | | - | |
7782 | | - | |
7783 | | - | |
7784 | | - | |
7785 | | - | |
7786 | | - | |
7787 | | - | |
| 7752 | + | |
7788 | 7753 | | |
7789 | 7754 | | |
7790 | 7755 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
532 | 585 | | |
533 | 586 | | |
534 | 587 | | |
| |||
927 | 980 | | |
928 | 981 | | |
929 | 982 | | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
930 | 1006 | | |
931 | 1007 | | |
932 | 1008 | | |
| |||
0 commit comments