From e1ed215a6006249beff71b2f04af884e65a361cc Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 16 Feb 2004 07:11:36 +0000 Subject: [PATCH] Fix annoying dupe messages with chunksize --- maintenance/compressOld.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maintenance/compressOld.inc b/maintenance/compressOld.inc index 22317c6497..58bc9b45af 100644 --- a/maintenance/compressOld.inc +++ b/maintenance/compressOld.inc @@ -6,7 +6,8 @@ function compressOldPages( $start = 0 ) { $chunksize = 50; print "Starting from old_id $start...\n"; do { - $sql = "SELECT old_id,old_flags,old_namespace,old_title,old_text FROM old WHERE old_id>=$start ORDER BY old_id LIMIT $chunksize"; + $end = $start + $chunksize; + $sql = "SELECT old_id,old_flags,old_namespace,old_title,old_text FROM old WHERE old_id>=$start AND old_id<$end ORDER BY old_id LIMIT $chunksize"; $res = wfQuery( $sql, DB_READ, "compressOldPages" ); if( wfNumRows( $res ) == 0 ) { break; -- 2.20.1