Skip to content

Commit 173d9d5

Browse files
committed
Revert VALUES-aliasing fallback patch (ineffective and regresses tests)
The UNION-ALL header prefix didn't fix Turso's "no such column: columnN" errors (Turso still rejects the outer SELECT's reference into the subquery even with an explicit alias header), and the change emitted a different SQL form that broke 4 Translation_Tests (testInsert, testInsertWithTypeCasting, testReplace, testReplaceWithTypeCasting). Revert; a proper fix requires inlining the VALUES expressions directly into the outer SELECT, or patching Turso's INSERT-SELECT subquery aliasing — both larger than a string replacement.
1 parent 5cd7538 commit 173d9d5

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

.github/workflows/phpunit-tests-turso.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,22 +1016,6 @@ jobs:
10161016
open(path, 'w').write(src)
10171017
print('patched hex-literal alias force under Turso')
10181018
1019-
# 9. Turso doesn't propagate VALUES row-column aliases (column1,
1020-
# column2, ...) through `INSERT ... SELECT ... FROM (VALUES (...))`
1021-
# subqueries, even though top-level `SELECT column1 FROM (VALUES
1022-
# (...))` works in its own test suite. The driver already has a
1023-
# legacy fallback for SQLite < 3.33 that prepends an explicit
1024-
# `SELECT NULL AS column1, ... WHERE FALSE UNION ALL ...` so the
1025-
# UNION output carries the aliases. Force-enable that fallback
1026-
# unconditionally so it applies under Turso too.
1027-
path = 'src/sqlite/class-wp-pdo-mysql-on-sqlite.php'
1028-
src = open(path).read()
1029-
old = "\t\t\t$is_values_naming_supported = version_compare( $this->get_sqlite_version(), '3.33.0', '>=' );"
1030-
new = "\t\t\t$is_values_naming_supported = false; // Turso: always use UNION ALL header fallback."
1031-
assert old in src, 'is_values_naming_supported assignment not found'
1032-
open(path, 'w').write(src.replace(old, new, 1))
1033-
print('patched VALUES-aliasing fallback to always-on under Turso')
1034-
10351019
# 10. CHECK TABLE on a missing table on real SQLite raises from
10361020
# `PRAGMA integrity_check(<tbl>)`; on Turso the PRAGMA is a
10371021
# no-op for unknown tables, so testCheckTable sees status=OK

0 commit comments

Comments
 (0)