From 60cfa5d6c2dbda368eaacc420a1f9a73ff8331c1 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 15 Jan 2024 22:59:45 +0000 Subject: [PATCH] mysql?? --- tests/bootstrap.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b22ad8ac..297307f3 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -40,5 +40,10 @@ $user = User::by_id($config->get_int("anon_id", 0)); $userPage = new UserPage(); $userPage->onUserCreation(new UserCreationEvent("demo", "demo", "demo", "demo@demo.com", false)); $userPage->onUserCreation(new UserCreationEvent("test", "test", "test", "test@test.com", false)); -$database->commit(); +// in mysql, CREATE TABLE commits transactions, so after the database +// upgrade we may or may not be inside a transaction depending on if +// any tables were created. +if(!$database->is_transaction_open()) { + $database->commit(); +} $_tracer->end();