mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
MINOR: catch VACUUM authorization error
This commit is contained in:
parent
022afe8a5a
commit
7ad5ac0808
@ -361,8 +361,12 @@ class SQLite3Database extends SS_Database {
|
|||||||
$this->alterationMessage("Checking database integrity","repaired");
|
$this->alterationMessage("Checking database integrity","repaired");
|
||||||
if($msgs = $this->query('PRAGMA integrity_check')) foreach($msgs as $msg) if($msg['integrity_check'] != 'ok') { Debug::show($msg['integrity_check']); $ok = false; }
|
if($msgs = $this->query('PRAGMA integrity_check')) foreach($msgs as $msg) if($msg['integrity_check'] != 'ok') { Debug::show($msg['integrity_check']); $ok = false; }
|
||||||
if(self::$vacuum) {
|
if(self::$vacuum) {
|
||||||
$this->query('VACUUM');
|
$this->query('VACUUM', E_USER_NOTICE);
|
||||||
$this->alterationMessage("VACUUMing","repaired");
|
if(preg_match('/authoriz/', $msg = $this->dbConn->lastErrorMsg())) {
|
||||||
|
$this->alterationMessage('VACUUM | ' . $msg, "error");
|
||||||
|
} else {
|
||||||
|
$this->alterationMessage("VACUUMing", "repaired");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self::$checked_and_repaired = true;
|
self::$checked_and_repaired = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user