Skip to content

Commit 7406405

Browse files
committed
Probe: include the test class's setUp tables before testCreateTemporaryTable
WP_SQLite_Driver_Tests::setUp() creates two permanent tables (_options, _dates) with INTEGER PRIMARY KEY AUTO_INCREMENT BEFORE the test method runs. The probe was missing this prior state. Add the setUp tables to the probe and re-run — if the bug now reproduces, we have the minimal repro and can isolate which specific operation triggers it.
1 parent 03f042f commit 7406405

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,19 @@ jobs:
20462046
}
20472047
}
20482048
2049-
run_test('testCreateTemporaryTable', function ($engine) {
2049+
run_test('testCreateTemporaryTable (with WP_SQLite_Driver_Tests::setUp prefix)', function ($engine) {
2050+
// Mirror WP_SQLite_Driver_Tests::setUp() — creates 2 permanent
2051+
// tables with AUTO_INCREMENT BEFORE the temp table operation.
2052+
$engine->query("CREATE TABLE _options (
2053+
ID INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
2054+
option_name TEXT NOT NULL default '',
2055+
option_value TEXT NOT NULL default ''
2056+
)");
2057+
$engine->query("CREATE TABLE _dates (
2058+
ID INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
2059+
option_name TEXT NOT NULL default '',
2060+
option_value DATETIME NOT NULL
2061+
)");
20502062
$engine->query('CREATE TEMPORARY TABLE _tmp_table (
20512063
ID INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
20522064
option_name TEXT NOT NULL default \'\',

0 commit comments

Comments
 (0)