Don't format old_id ranges in scientific (%E) notation.
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 12 Feb 2010 05:17:12 +0000 (05:17 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 12 Feb 2010 05:17:12 +0000 (05:17 +0000)
maintenance/storage/storageTypeStats.php

index 190bb69..9db35e9 100644 (file)
@@ -13,7 +13,7 @@ class StorageTypeStats extends Maintenance {
                }
 
                $rangeStart = 0;
-               $binSize = pow( 10, floor( log10( $endId ) ) - 3 );
+               $binSize = intval( pow( 10, floor( log10( $endId ) ) - 3 ) );
                if ( $binSize < 100 ) {
                        $binSize = 100;
                }
@@ -52,8 +52,8 @@ SQL;
                                        'COUNT(*) as count',
                                ),
                                array(
-                                       'old_id >= ' . $dbr->addQuotes( $rangeStart ),
-                                       'old_id < ' . $dbr->addQuotes( $rangeStart + $binSize )
+                                       'old_id >= ' . intval( $rangeStart ),
+                                       'old_id < ' . intval( $rangeStart + $binSize )
                                ),
                                __METHOD__,
                                array( 'GROUP BY' => 'old_flags, class' )