r60164 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60163‎ | r60164 | r60165 >
Date:15:48, 17 December 2009
Author:maxsem
Status:ok
Tags:
Comment:
While coding r58014, I thought that VACUUM on a 0-byte databse results in an error - it doesn't
Modified paths:
  • /trunk/phase3/maintenance/sqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/sqlite.php
@@ -49,6 +49,9 @@
5050
5151 private function vacuum() {
5252 $prevSize = filesize( $this->db->mDatabaseFile );
 53+ if ( $prevSize == 0 ) {
 54+ $this->error( "Can't vacuum an empty database.\n", true );
 55+ }
5356
5457 $this->output( 'VACUUM: ' );
5558 if ( $this->db->query( 'VACUUM' ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58014That way of percentage calculation was an epic fail:)maxsem15:39, 22 October 2009

Status & tagging log