Repository navigation
Commit be0bdf8
Fix temporary table lookup without stringified fetches and with a different case
The temporary table lookup compared the fetched value to the string "1".
PDO SQLite returns native types unless fetches are stringified, so on
PHP 8.1 and newer, the lookup never found a temporary table for callers
that don't set PDO::ATTR_STRINGIFY_FETCHES. Statements like ALTER TABLE,
SHOW COLUMNS, or DESCRIBE then failed or used a standard table of the same
name instead.
The lookup also matched the table name case-sensitively, unlike the
information schema tables, so a temporary table was not found when the
statement used a differently cased name.
Match the name case-insensitively and check the fetched value for presence
rather than comparing it to a string.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 6546e45 commit be0bdf8
3 files changed
Lines changed: 38 additions & 3 deletions
File tree
- packages/mysql-on-sqlite
- src/sqlite
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | | - | |
| 390 | + | |
387 | 391 | | |
388 | 392 | | |
389 | | - | |
| 393 | + | |
390 | 394 | | |
391 | 395 | | |
392 | 396 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5842 | 5842 | | |
5843 | 5843 | | |
5844 | 5844 | | |
| 5845 | + | |
| 5846 | + | |
| 5847 | + | |
| 5848 | + | |
| 5849 | + | |
| 5850 | + | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
| 5854 | + | |
| 5855 | + | |
| 5856 | + | |
| 5857 | + | |
| 5858 | + | |
| 5859 | + | |
| 5860 | + | |
| 5861 | + | |
| 5862 | + | |
| 5863 | + | |
| 5864 | + | |
| 5865 | + | |
| 5866 | + | |
| 5867 | + | |
| 5868 | + | |
| 5869 | + | |
| 5870 | + | |
| 5871 | + | |
| 5872 | + | |
| 5873 | + | |
| 5874 | + | |
| 5875 | + | |
5845 | 5876 | | |
5846 | 5877 | | |
5847 | 5878 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2157 | 2157 | | |
2158 | 2158 | | |
2159 | 2159 | | |
2160 | | - | |
| 2160 | + | |
2161 | 2161 | | |
2162 | 2162 | | |
2163 | 2163 | | |
| |||
0 commit comments