aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/sqlite.php
diff options
context:
space:
mode:
authorMax Semenik <maxsem@users.mediawiki.org>2009-12-17 15:48:49 +0000
committerMax Semenik <maxsem@users.mediawiki.org>2009-12-17 15:48:49 +0000
commit1ddb7210be9e5910b5e0c2a87f5c300455d6b1ca (patch)
tree18dad5d559145b944c15a77884c96534ffdabc55 /maintenance/sqlite.php
parentb4b5eeb2c65db54b3463f92f071d1e3cc220c12c (diff)
downloadmediawikicore-1ddb7210be9e5910b5e0c2a87f5c300455d6b1ca.tar.gz
mediawikicore-1ddb7210be9e5910b5e0c2a87f5c300455d6b1ca.zip
While coding r58014, I thought that VACUUM on a 0-byte databse results in an error - it doesn't
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/60164
Diffstat (limited to 'maintenance/sqlite.php')
-rw-r--r--maintenance/sqlite.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/maintenance/sqlite.php b/maintenance/sqlite.php
index 681631ae9830..46a038cecae2 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' ) ) {