mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
disable transaction for mysql for restore, as a failure during restore may lead to an empty database, as drop table is not transactional for mysql
This commit is contained in:
parent
9f6d14690e
commit
e95d46b7bc
@ -359,7 +359,7 @@ class db_backup
|
||||
$system_config[] = $row;
|
||||
}
|
||||
}
|
||||
$this->db->transaction_begin();
|
||||
if (substr($this->db->Type,0,5) != 'mysql') $this->db->transaction_begin();
|
||||
|
||||
// drop all existing tables
|
||||
foreach($this->adodb->MetaTables('TABLES') as $table)
|
||||
@ -616,10 +616,13 @@ class db_backup
|
||||
unlink($name);
|
||||
rmdir($dir.'/database_backup');
|
||||
}
|
||||
if (substr($this->db->Type,0,5) != 'mysql')
|
||||
{
|
||||
if (!$this->db->transaction_commit())
|
||||
{
|
||||
return lang('Restore failed');
|
||||
}
|
||||
}
|
||||
// flush instance cache
|
||||
egw_cache::flush(egw_cache::INSTANCE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user