From: Brion Vibber Date: Mon, 16 Feb 2004 07:11:36 +0000 (+0000) Subject: Fix annoying dupe messages with chunksize X-Git-Tag: 1.3.0beta1~981 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/message.php?a=commitdiff_plain;h=e1ed215a6006249beff71b2f04af884e65a361cc;p=lhc%2Fweb%2Fwiklou.git Fix annoying dupe messages with chunksize --- 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;