From 1ddb7210be9e5910b5e0c2a87f5c300455d6b1ca Mon Sep 17 00:00:00 2001 From: Max Semenik Date: Thu, 17 Dec 2009 15:48:49 +0000 Subject: [PATCH] While coding r58014, I thought that VACUUM on a 0-byte databse results in an error - it doesn't --- maintenance/sqlite.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php index 681631ae98..46a038ceca 100644 --- a/maintenance/sqlite.php +++ b/maintenance/sqlite.php @@ -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' ) ) { -- 2.20.1