diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-12-06 08:55:19 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-12-06 08:55:19 +0000 |
| commit | 8cf535f5cf6d8fc248cefddddc5319e829a120f7 (patch) | |
| tree | 65d10acd0fe9fdd885382c70b2a1bac85da69800 | |
| parent | 0881e608f880b5b8060e54dbf9eba7e234eee8c6 (diff) | |
| download | forums-8cf535f5cf6d8fc248cefddddc5319e829a120f7.tar forums-8cf535f5cf6d8fc248cefddddc5319e829a120f7.tar.gz forums-8cf535f5cf6d8fc248cefddddc5319e829a120f7.tar.bz2 forums-8cf535f5cf6d8fc248cefddddc5319e829a120f7.tar.xz forums-8cf535f5cf6d8fc248cefddddc5319e829a120f7.zip | |
- 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
| -rw-r--r-- | phpBB/includes/db/dbal.php | 7 | ||||
| -rw-r--r-- | phpBB/install/database_update.php | 2 |
2 files changed, 8 insertions, 1 deletions
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(); <?php +garbage_collection(); + if (function_exists('exit_handler')) { exit_handler(); |
