While coding r58014, I thought that VACUUM on a 0-byte databse results in an error - it doesn't

This commit is contained in:
Max Semenik 2009-12-17 15:48:49 +00:00
parent b4b5eeb2c6
commit 1ddb7210be

View file

@ -49,6 +49,9 @@ class SqliteMaintenance extends Maintenance {
private function vacuum() {
$prevSize = filesize( $this->db->mDatabaseFile );
if ( $prevSize == 0 ) {
$this->error( "Can't vacuum an empty database.\n", true );
}
$this->output( 'VACUUM: ' );
if ( $this->db->query( 'VACUUM' ) ) {