While coding r58014, I thought that VACUUM on a 0-byte databse results in an error...
authorMax Semenik <maxsem@users.mediawiki.org>
Thu, 17 Dec 2009 15:48:49 +0000 (15:48 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Thu, 17 Dec 2009 15:48:49 +0000 (15:48 +0000)
maintenance/sqlite.php

index 681631a..46a038c 100644 (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' ) ) {