- 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
This commit is contained in:
Meik Sievertsen 2007-12-06 08:55:19 +00:00
parent 0881e608f8
commit 8cf535f5cf
2 changed files with 8 additions and 1 deletions

View file

@ -589,6 +589,11 @@ class dbal
trigger_error($message, E_USER_ERROR);
}
if ($this->transaction)
{
$this->sql_transaction('rollback');
}
return $error;
}

View file

@ -1649,6 +1649,8 @@ $cache->purge();
<?php
garbage_collection();
if (function_exists('exit_handler'))
{
exit_handler();