From 8cf535f5cf6d8fc248cefddddc5319e829a120f7 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 6 Dec 2007 08:55:19 +0000 Subject: [PATCH] - on database update, execute garbage_collection(). This ensures a proper closed db and written cache - on sql errors returning (and not triggering an error) execute the rollback too both "bugs" resulted in transactions left open if a query returned an error on database update preventing a clean update. Symptoms being for example oracle users not having all database info updated, the version number not changing or config variables not written. git-svn-id: file:///svn/phpbb/trunk@8270 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/db/dbal.php | 7 ++++++- phpBB/install/database_update.php | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php index ed6ba71fea..b49f4511aa 100644 --- a/phpBB/includes/db/dbal.php +++ b/phpBB/includes/db/dbal.php @@ -588,7 +588,12 @@ class dbal trigger_error($message, E_USER_ERROR); } - + + if ($this->transaction) + { + $this->sql_transaction('rollback'); + } + return $error; } diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 3b506a55b2..03f64c8f24 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1649,6 +1649,8 @@ $cache->purge();