Skip to content

Commit 23f2179

Browse files
committed
Probe testTemporaryTableHasPriority — find its specific failing SQL
testCreateTemporaryTable now passes (Turso translate_drop_table fix landed +1 test). testTemporaryTableHasPriorityOverStandardTable still errors at ALTER TABLE; my translate_drop_table fix didn't help since the test's tables don't have AUTOINCREMENT. Reproduce its full sequence in the probe so we can see which SQL Turso mis-handles.
1 parent 08ca947 commit 23f2179

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,27 @@ jobs:
21222122
$r = $engine->query('SELECT TABLE_NAME FROM information_schema.tables WHERE `AUTO_INCREMENT` > 3');
21232123
fwrite(STDERR, " -> " . count($r) . " row(s): " . json_encode(array_map(fn($o) => $o->TABLE_NAME, $r)) . "\n");
21242124
});
2125+
2126+
run_test('testTemporaryTableHasPriorityOverStandardTable (with WP_SQLite_Driver_Tests::setUp prefix)', function ($engine) {
2127+
$engine->query("CREATE TABLE _options (
2128+
ID INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
2129+
option_name TEXT NOT NULL default '',
2130+
option_value TEXT NOT NULL default ''
2131+
)");
2132+
$engine->query("CREATE TABLE _dates (
2133+
ID INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
2134+
option_name TEXT NOT NULL default '',
2135+
option_value DATETIME NOT NULL
2136+
)");
2137+
$engine->query('CREATE TABLE t (a INT, INDEX ia(a))');
2138+
$engine->query('CREATE TEMPORARY TABLE t (b INT, INDEX ib(b))');
2139+
$engine->query('SHOW CREATE TABLE t');
2140+
$engine->query('SHOW COLUMNS FROM t');
2141+
$engine->query('DESCRIBE t');
2142+
$engine->query('SHOW INDEXES FROM t');
2143+
$engine->query('ALTER TABLE t ADD COLUMN c INT');
2144+
$engine->query('SHOW COLUMNS FROM t');
2145+
});
21252146
PHP
21262147
echo "(probe step: continue-on-error)"
21272148

0 commit comments

Comments
 (0)