Last modified: 2008-01-24 11:21:56 UTC
When running maintenance/storage/compressOld.php -t gzip this error occurs: Starting from old_id 0... A database query syntax error has occurred. The last attempted database query was: " SELECT old_id,old_flags,old_namespace,old_title,old_text FROM `text` WHERE old_id>=0 ORDER BY old_id LIMIT 50 FOR UPDATE" from within function "compressOldPages". MySQL returned error "1054: Unknown column 'old_namespace' in 'field list' This is because table text has only three fields: old_id, old_text and old_flags. The following patch fixes it: Index: maintenance/storage/compressOld.inc =================================================================== --- maintenance/storage/compressOld.inc (revision 30055) +++ maintenance/storage/compressOld.inc (working copy) @@ -15,7 +15,7 @@ print "Starting from old_id $start...\n"; $dbw = wfGetDB( DB_MASTER ); do { - $res = $dbw->select( 'text', array( 'old_id','old_flags','old_namespace','old_title','old_text' ), + $res = $dbw->select( 'text', array( 'old_id','old_flags','old_text' ), "old_id>=$start", $fname, array( 'ORDER BY' => 'old_id', 'LIMIT' => $chunksize, 'FOR UPDATE' ) ); if( $dbw->numRows( $res ) == 0 ) { break;
Fixed with r30110.