Chad has uploaded a new change for review.
https://gerrit.wikimedia.org/r/150699
Change subject: WIP: Remove hitcounters
......................................................................
WIP: Remove hitcounters
Change-Id: I0e5006a7e8a09c800f8fa4effa9399e8afdd7a57
---
M includes/AutoLoader.php
M includes/DefaultSettings.php
M includes/SiteStats.php
M includes/SkinTemplate.php
M includes/actions/InfoAction.php
M includes/api/ApiQueryInfo.php
M includes/api/ApiQuerySiteinfo.php
M includes/deferred/SiteStatsUpdate.php
D includes/deferred/ViewCountUpdate.php
M includes/installer/Installer.php
M includes/installer/MysqlUpdater.php
M includes/installer/OracleUpdater.php
M includes/page/WikiPage.php
M includes/parser/CoreParserFunctions.php
M includes/parser/Parser.php
M includes/specialpage/QueryPage.php
M includes/specialpage/SpecialPageFactory.php
D includes/specials/SpecialPopularpages.php
M includes/specials/SpecialStatistics.php
D maintenance/archives/patch-hitcounter.sql
M maintenance/dictionary/mediawiki.dic
M maintenance/initSiteStats.php
M maintenance/mssql/tables.sql
M maintenance/oracle/tables.sql
M maintenance/postgres/compare_schemas.pl
M maintenance/postgres/tables.sql
M maintenance/showSiteStats.php
M maintenance/sqlite/archives/initial-indexes.sql
M maintenance/sqlite/archives/patch-drop-ss_admins.sql
M maintenance/tables.sql
M tests/parser/parserTest.inc
M tests/phpunit/data/db/sqlite/tables-1.13.sql
M tests/phpunit/data/db/sqlite/tables-1.15.sql
M tests/phpunit/data/db/sqlite/tables-1.16.sql
M tests/phpunit/data/db/sqlite/tables-1.17.sql
M tests/phpunit/data/db/sqlite/tables-1.18.sql
36 files changed, 16 insertions(+), 517 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/99/150699/1
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 9fa0c13..fbc0cf6 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -473,7 +473,6 @@
'SiteStatsUpdate' => 'includes/deferred/SiteStatsUpdate.php',
'SqlDataUpdate' => 'includes/deferred/SqlDataUpdate.php',
'SquidUpdate' => 'includes/deferred/SquidUpdate.php',
- 'ViewCountUpdate' => 'includes/deferred/ViewCountUpdate.php',
# includes/diff
'DiffEngine' => 'includes/diff/DairikiDiff.php',
@@ -986,7 +985,6 @@
'NewFilesPager' => 'includes/specials/SpecialNewimages.php',
'NewPagesPager' => 'includes/specials/SpecialNewpages.php',
'PageArchive' => 'includes/specials/SpecialUndelete.php',
- 'PopularPagesPage' => 'includes/specials/SpecialPopularpages.php',
'ProtectedPagesPager' => 'includes/specials/SpecialProtectedpages.php',
'ProtectedTitlesPager' =>
'includes/specials/SpecialProtectedtitles.php',
'RandomPage' => 'includes/specials/SpecialRandompage.php',
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 7c7f6ab..20b1ca0 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -4098,15 +4098,6 @@
$wgArticleCountMethod = 'link';
/**
- * wgHitcounterUpdateFreq sets how often page counters should be updated,
higher
- * values are easier on the database. A value of 1 causes the counters to be
- * updated on every hit, any higher value n cause them to update *on average*
- * every n hits. Should be set to either 1 or something largish, eg 1000, for
- * maximum efficiency.
- */
-$wgHitcounterUpdateFreq = 1;
-
-/**
* How many days user must be idle before he is considered inactive. Will
affect
* the number shown on Special:Statistics, Special:ActiveUsers, and the
* {{NUMBEROFACTIVEUSERS}} magic word in wikitext.
@@ -5364,12 +5355,6 @@
* @since 1.22
*/
$wgStatsFormatString = "stats/%s - %s 1 1 1 1 %s\n";
-
-/**
- * Whereas to count the number of time an article is viewed.
- * Does not work if pages are cached (for example with squid).
- */
-$wgDisableCounters = false;
/**
* InfoAction retrieves a list of transclusion links (both to and from).
diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index 3dc1793..dfa64d5 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -102,7 +102,6 @@
static function doLoad( $db ) {
return $db->selectRow( 'site_stats', array(
'ss_row_id',
- 'ss_total_views',
'ss_total_edits',
'ss_good_articles',
'ss_total_pages',
@@ -110,14 +109,6 @@
'ss_active_users',
'ss_images',
), false, __METHOD__ );
- }
-
- /**
- * @return int
- */
- static function views() {
- self::load();
- return self::$row->ss_total_views;
}
/**
@@ -249,7 +240,6 @@
}
// Now check for underflow/overflow
foreach ( array(
- 'ss_total_views',
'ss_total_edits',
'ss_good_articles',
'ss_total_pages',
@@ -274,7 +264,7 @@
// Various stats
private $mEdits = null, $mArticles = null, $mPages = null;
- private $mUsers = null, $mViews = null, $mFiles = null;
+ private $mUsers = null, $mFiles = null;
/**
* Constructor
@@ -349,15 +339,6 @@
}
/**
- * Count views
- * @return int
- */
- public function views() {
- $this->mViews = $this->db->selectField( 'page',
'SUM(page_counter)', '', __METHOD__ );
- return $this->mViews;
- }
-
- /**
* Count total files
* @return int
*/
@@ -374,11 +355,10 @@
* - Boolean: whether to use the master DB
* - DatabaseBase: database connection to use
* @param array $options Array of options, may contain the following
values
- * - views Boolean: when true, do not update the number of page views
(default: true)
* - activeUsers Boolean: whether to update the number of active users
(default: false)
*/
public static function doAllAndCommit( $database, array $options =
array() ) {
- $options += array( 'update' => false, 'views' => true,
'activeUsers' => false );
+ $options += array( 'update' => false, 'activeUsers' => false );
// Grab the object and count everything
$counter = new SiteStatsInit( $database );
@@ -389,11 +369,6 @@
$counter->users();
$counter->files();
- // Only do views if we don't want to not count them
- if ( $options['views'] ) {
- $counter->views();
- }
-
$counter->refresh();
// Count active users if need be
@@ -403,8 +378,7 @@
}
/**
- * Refresh site_stats. If you want ss_total_views to be updated, be
sure to
- * call views() first.
+ * Refresh site_stats
*/
public function refresh() {
$values = array(
@@ -414,8 +388,6 @@
'ss_total_pages' => ( $this->mPages === null ?
$this->pages() : $this->mPages ),
'ss_users' => ( $this->mUsers === null ? $this->users()
: $this->mUsers ),
'ss_images' => ( $this->mFiles === null ?
$this->files() : $this->mFiles ),
- ) + (
- $this->mViews ? array( 'ss_total_views' =>
$this->mViews ) : array()
);
$dbw = wfGetDB( DB_MASTER );
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index 52e72e8..c702b1d 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -295,7 +295,7 @@
*/
protected function prepareQuickTemplate() {
global $wgContLang, $wgScript, $wgStylePath, $wgMimeType,
$wgJsMimeType,
- $wgDisableCounters, $wgSitename, $wgLogo, $wgMaxCredits,
+ $wgSitename, $wgLogo, $wgMaxCredits,
$wgShowCreditsIfMax, $wgPageShowWatchingUsers,
$wgArticlePath,
$wgScriptPath, $wgServer;
@@ -414,13 +414,6 @@
$tpl->set( 'numberofwatchingusers', false );
if ( $out->isArticle() && $title->exists() ) {
if ( $this->isRevisionCurrent() ) {
- if ( !$wgDisableCounters ) {
- $viewcount =
$this->getWikiPage()->getCount();
- if ( $viewcount ) {
- $tpl->set( 'viewcount',
$this->msg( 'viewcount' )->numParams( $viewcount )->parse() );
- }
- }
-
if ( $wgPageShowWatchingUsers ) {
$dbr = wfGetDB( DB_SLAVE );
$num = $dbr->selectField( 'watchlist',
'COUNT(*)',
diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index c2c1ff5..0fe848c 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -314,13 +314,6 @@
$this->msg( 'pageinfo-robot-policy' ), $this->msg(
"pageinfo-robot-${policy['index']}" )
);
- if ( isset( $pageCounts['views'] ) ) {
- // Number of views
- $pageInfo['header-basic'][] = array(
- $this->msg( 'pageinfo-views' ),
$lang->formatNum( $pageCounts['views'] )
- );
- }
-
if (
$user->isAllowed( 'unwatchedpages' ) ||
( $wgUnwatchedPageThreshold !== false &&
@@ -636,24 +629,13 @@
* @return array
*/
protected static function pageCounts( Title $title ) {
- global $wgRCMaxAge, $wgDisableCounters, $wgMiserMode;
+ global $wgRCMaxAge, $wgMiserMode;
wfProfileIn( __METHOD__ );
$id = $title->getArticleID();
$dbr = wfGetDB( DB_SLAVE );
$result = array();
-
- if ( !$wgDisableCounters ) {
- // Number of views
- $views = (int)$dbr->selectField(
- 'page',
- 'page_counter',
- array( 'page_id' => $id ),
- __METHOD__
- );
- $result['views'] = $views;
- }
// Number of page watchers
$watchers = (int)$dbr->selectField(
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index 8b6886d..c9ec092 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -64,9 +64,6 @@
}
$pageSet->requestField( 'page_is_new' );
$config = $this->getConfig();
- if ( !$config->get( 'DisableCounters' ) ) {
- $pageSet->requestField( 'page_counter' );
- }
$pageSet->requestField( 'page_touched' );
$pageSet->requestField( 'page_latest' );
$pageSet->requestField( 'page_len' );
@@ -294,9 +291,6 @@
: array();
$this->pageIsNew = $pageSet->getCustomField( 'page_is_new' );
- if ( !$this->getConfig()->get( 'DisableCounters' ) ) {
- $this->pageCounter = $pageSet->getCustomField(
'page_counter' );
- }
$this->pageTouched = $pageSet->getCustomField( 'page_touched' );
$this->pageLatest = $pageSet->getCustomField( 'page_latest' );
$this->pageLength = $pageSet->getCustomField( 'page_len' );
@@ -358,9 +352,6 @@
if ( $titleExists ) {
$pageInfo['touched'] = wfTimestamp( TS_ISO_8601,
$this->pageTouched[$pageid] );
$pageInfo['lastrevid'] = intval(
$this->pageLatest[$pageid] );
- $pageInfo['counter'] = $this->getConfig()->get(
'DisableCounters' )
- ? ''
- : intval( $this->pageCounter[$pageid] );
$pageInfo['length'] = intval(
$this->pageLength[$pageid] );
if ( isset( $this->pageIsRedir[$pageid] ) &&
$this->pageIsRedir[$pageid] ) {
diff --git a/includes/api/ApiQuerySiteinfo.php
b/includes/api/ApiQuerySiteinfo.php
index 30201fc..4e23c4b 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -478,9 +478,6 @@
$data = array();
$data['pages'] = intval( SiteStats::pages() );
$data['articles'] = intval( SiteStats::articles() );
- if ( !$this->getConfig()->get( 'DisableCounters' ) ) {
- $data['views'] = intval( SiteStats::views() );
- }
$data['edits'] = intval( SiteStats::edits() );
$data['images'] = intval( SiteStats::images() );
$data['users'] = intval( SiteStats::users() );
diff --git a/includes/deferred/SiteStatsUpdate.php
b/includes/deferred/SiteStatsUpdate.php
index 7bfafee..97a17c3 100644
--- a/includes/deferred/SiteStatsUpdate.php
+++ b/includes/deferred/SiteStatsUpdate.php
@@ -23,9 +23,6 @@
*/
class SiteStatsUpdate implements DeferrableUpdate {
/** @var int */
- protected $views = 0;
-
- /** @var int */
protected $edits = 0;
/** @var int */
@@ -42,7 +39,6 @@
// @todo deprecate this constructor
function __construct( $views, $edits, $good, $pages = 0, $users = 0 ) {
- $this->views = $views;
$this->edits = $edits;
$this->articles = $good;
$this->pages = $pages;
@@ -100,7 +96,6 @@
}
$pd = $this->getPendingDeltas();
// Piggy-back the async deltas onto those of this stats
update....
- $this->views += ( $pd['ss_total_views']['+'] -
$pd['ss_total_views']['-'] );
$this->edits += ( $pd['ss_total_edits']['+'] -
$pd['ss_total_edits']['-'] );
$this->articles += ( $pd['ss_good_articles']['+'] -
$pd['ss_good_articles']['-'] );
$this->pages += ( $pd['ss_total_pages']['+'] -
$pd['ss_total_pages']['-'] );
@@ -110,7 +105,6 @@
// Build up an SQL query of deltas and apply them...
$updates = '';
- $this->appendUpdate( $updates, 'ss_total_views', $this->views );
$this->appendUpdate( $updates, 'ss_total_edits', $this->edits );
$this->appendUpdate( $updates, 'ss_good_articles',
$this->articles );
$this->appendUpdate( $updates, 'ss_total_pages', $this->pages );
@@ -160,7 +154,6 @@
}
protected function doUpdatePendingDeltas() {
- $this->adjustPending( 'ss_total_views', $this->views );
$this->adjustPending( 'ss_total_edits', $this->edits );
$this->adjustPending( 'ss_good_articles', $this->articles );
$this->adjustPending( 'ss_total_pages', $this->pages );
@@ -226,7 +219,7 @@
global $wgMemc;
$pending = array();
- foreach ( array( 'ss_total_views', 'ss_total_edits',
+ foreach ( array( 'ss_total_edits',
'ss_good_articles', 'ss_total_pages', 'ss_users',
'ss_images' ) as $type
) {
// Get pending increments and pending decrements
diff --git a/includes/deferred/ViewCountUpdate.php
b/includes/deferred/ViewCountUpdate.php
deleted file mode 100644
index 8282295..0000000
--- a/includes/deferred/ViewCountUpdate.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * Update for the 'page_counter' field
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-/**
- * Update for the 'page_counter' field, when $wgDisableCounters is false.
- *
- * Depending on $wgHitcounterUpdateFreq, this will directly increment the
- * 'page_counter' field or use the 'hitcounter' table and then collect the data
- * from that table to update the 'page_counter' field in a batch operation.
- */
-class ViewCountUpdate implements DeferrableUpdate {
- /** @var int Page ID to increment the view count */
- protected $id;
-
- /**
- * Constructor
- *
- * @param int $id Page ID to increment the view count
- */
- public function __construct( $id ) {
- $this->id = intval( $id );
- }
-
- /**
- * Run the update
- */
- public function doUpdate() {
- global $wgHitcounterUpdateFreq;
-
- $dbw = wfGetDB( DB_MASTER );
-
- if ( $wgHitcounterUpdateFreq <= 1 || $dbw->getType() ==
'sqlite' ) {
- $id = $this->id;
- $method = __METHOD__;
- $dbw->onTransactionIdle( function () use ( $dbw, $id,
$method ) {
- try {
- $dbw->update( 'page',
- array( 'page_counter =
page_counter + 1' ),
- array( 'page_id' => $id ),
- $method
- );
- } catch ( DBError $e ) {
- MWExceptionHandler::logException( $e );
- }
- } );
- return;
- }
-
- # Not important enough to warrant an error page in case of
failure
- try {
- // Since `hitcounter` is non-transactional, the
contention is minimal
- $dbw->insert( 'hitcounter', array( 'hc_id' => $this->id
), __METHOD__ );
- $checkfreq = intval( $wgHitcounterUpdateFreq / 25 + 1 );
- if ( rand() % $checkfreq == 0 && $dbw->lastErrno() == 0
) {
- $this->collect();
- }
- } catch ( DBError $e ) {
- MWExceptionHandler::logException( $e );
- }
- }
-
- protected function collect() {
- global $wgHitcounterUpdateFreq;
-
- $dbw = wfGetDB( DB_MASTER );
-
- $rown = $dbw->selectField( 'hitcounter', 'COUNT(*)', array(),
__METHOD__ );
- if ( $rown < $wgHitcounterUpdateFreq ) {
- return;
- }
-
- wfProfileIn( __METHOD__ . '-collect' );
- $old_user_abort = ignore_user_abort( true );
-
- $dbType = $dbw->getType();
- $tabletype = $dbType == 'mysql' ? "ENGINE=HEAP " : '';
- $hitcounterTable = $dbw->tableName( 'hitcounter' );
- $acchitsTable = $dbw->tableName( 'acchits' );
- $pageTable = $dbw->tableName( 'page' );
-
- $dbw->lockTables( array(), array( 'hitcounter' ), __METHOD__,
false );
- $dbw->query( "CREATE TEMPORARY TABLE $acchitsTable $tabletype
AS " .
- "SELECT hc_id,COUNT(*) AS hc_n FROM $hitcounterTable " .
- 'GROUP BY hc_id', __METHOD__ );
- $dbw->delete( 'hitcounter', '*', __METHOD__ );
- $dbw->unlockTables( __METHOD__ );
-
- if ( $dbType == 'mysql' ) {
- $dbw->query( "UPDATE $pageTable,$acchitsTable SET
page_counter=page_counter + hc_n " .
- 'WHERE page_id = hc_id', __METHOD__ );
- } else {
- $dbw->query( "UPDATE $pageTable SET
page_counter=page_counter + hc_n " .
- "FROM $acchitsTable WHERE page_id = hc_id",
__METHOD__ );
- }
- $dbw->query( "DROP TABLE $acchitsTable", __METHOD__ );
-
- ignore_user_abort( $old_user_abort );
- wfProfileOut( __METHOD__ . '-collect' );
- }
-}
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 28304c2..346f1de 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -662,7 +662,6 @@
'site_stats',
array(
'ss_row_id' => 1,
- 'ss_total_views' => 0,
'ss_total_edits' => 0,
'ss_good_articles' => 0,
'ss_total_pages' => 0,
diff --git a/includes/installer/MysqlUpdater.php
b/includes/installer/MysqlUpdater.php
index dcf37b6..2088275 100644
--- a/includes/installer/MysqlUpdater.php
+++ b/includes/installer/MysqlUpdater.php
@@ -37,7 +37,6 @@
array( 'addField', 'ipblocks', 'ipb_expiry',
'patch-ipb_expiry.sql' ),
array( 'doInterwikiUpdate' ),
array( 'doIndexUpdate' ),
- array( 'addTable', 'hitcounter', 'patch-hitcounter.sql'
),
array( 'addField', 'recentchanges', 'rc_type',
'patch-rc_type.sql' ),
array( 'addIndex', 'recentchanges',
'new_name_timestamp', 'patch-rc-newindex.sql' ),
@@ -509,7 +508,6 @@
page_namespace int NOT NULL,
page_title varchar(255) binary NOT NULL,
page_restrictions tinyblob NOT NULL,
- page_counter bigint(20) unsigned NOT NULL default '0',
page_is_redirect tinyint(1) unsigned NOT NULL default
'0',
page_is_new tinyint(1) unsigned NOT NULL default '0',
page_random real unsigned NOT NULL,
@@ -591,9 +589,9 @@
$this->output( "......Setting up page table.\n" );
$this->db->query(
"INSERT INTO $page (page_id, page_namespace, page_title,
- page_restrictions, page_counter,
page_is_redirect, page_is_new, page_random,
+ page_restrictions, page_is_redirect,
page_is_new, page_random,
page_touched, page_latest, page_len)
- SELECT cur_id, cur_namespace, cur_title,
cur_restrictions, cur_counter,
+ SELECT cur_id, cur_namespace, cur_title,
cur_restrictions,
cur_is_redirect, cur_is_new, cur_random,
cur_touched, rev_id, LENGTH(cur_text)
FROM $cur,$revision
WHERE cur_id=rev_page AND rev_timestamp=cur_timestamp
AND rev_id > {$maxold}",
diff --git a/includes/installer/OracleUpdater.php
b/includes/installer/OracleUpdater.php
index 1846854..a25fb3b 100644
--- a/includes/installer/OracleUpdater.php
+++ b/includes/installer/OracleUpdater.php
@@ -172,7 +172,6 @@
'page_id' => 0,
'page_namespace' => 0,
'page_title' => ' ',
- 'page_counter' => 0,
'page_is_redirect' => 0,
'page_is_new' => 0,
'page_random' => 0,
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index be5ce3f..9056ca0 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -89,11 +89,6 @@
protected $mLinksUpdated = '19700101000000';
/**
- * @var int|null
- */
- protected $mCounter = null;
-
- /**
* Constructor and clear the article
* @param Title $title Reference to a Title object.
*/
@@ -247,7 +242,6 @@
*/
protected function clearCacheFields() {
$this->mId = null;
- $this->mCounter = null;
$this->mRedirectTarget = null; // Title object if set
$this->mLastRevision = null; // Latest revision
$this->mTouched = '19700101000000';
@@ -284,7 +278,6 @@
'page_namespace',
'page_title',
'page_restrictions',
- 'page_counter',
'page_is_redirect',
'page_is_new',
'page_random',
@@ -419,7 +412,6 @@
$this->mTitle->loadRestrictions(
$data->page_restrictions );
$this->mId = intval( $data->page_id );
- $this->mCounter = intval( $data->page_counter );
$this->mTouched = wfTimestamp( TS_MW,
$data->page_touched );
$this->mLinksUpdated = wfTimestampOrNull( TS_MW,
$data->page_links_updated );
$this->mIsRedirect = intval( $data->page_is_redirect );
@@ -474,17 +466,6 @@
*/
public function hasViewableContent() {
return $this->exists() || $this->mTitle->isAlwaysKnown();
- }
-
- /**
- * @return int The view count for the page
- */
- public function getCount() {
- if ( !$this->mDataLoaded ) {
- $this->loadPageData();
- }
-
- return $this->mCounter;
}
/**
@@ -1183,15 +1164,8 @@
* @param int $oldid The revision id being viewed. If not given or 0,
latest revision is assumed.
*/
public function doViewUpdates( User $user, $oldid = 0 ) {
- global $wgDisableCounters;
if ( wfReadOnly() ) {
return;
- }
-
- // Don't update page view counters on views from bot users (bug
14044)
- if ( !$wgDisableCounters && !$user->isAllowed( 'bot' ) &&
$this->exists() ) {
- DeferredUpdates::addUpdate( new ViewCountUpdate(
$this->getId() ) );
- DeferredUpdates::addUpdate( new SiteStatsUpdate( 1, 0,
0 ) );
}
// Update newtalk / watchlist notification status
@@ -1262,7 +1236,6 @@
'page_id' => $page_id,
'page_namespace' => $this->mTitle->getNamespace(),
'page_title' => $this->mTitle->getDBkey(),
- 'page_counter' => 0,
'page_restrictions' => '',
'page_is_redirect' => 0, // Will set this shortly...
'page_is_new' => 1,
diff --git a/includes/parser/CoreParserFunctions.php
b/includes/parser/CoreParserFunctions.php
index faff0e7..e210d86 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -489,8 +489,7 @@
return self::formatRaw( SiteStats::edits(), $raw );
}
static function numberofviews( $parser, $raw = null ) {
- global $wgDisableCounters;
- return !$wgDisableCounters ? self::formatRaw(
SiteStats::views(), $raw ) : '';
+ return '';
}
static function pagesinnamespace( $parser, $namespace = 0, $raw = null
) {
return self::formatRaw( SiteStats::pagesInNs( intval(
$namespace ) ), $raw );
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index bc4fcce..4ce6b07 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3097,8 +3097,7 @@
$value = $pageLang->formatNum(
SiteStats::edits() );
break;
case 'numberofviews':
- global $wgDisableCounters;
- $value = !$wgDisableCounters ?
$pageLang->formatNum( SiteStats::views() ) : '';
+ $value = '';
break;
case 'currenttimestamp':
$value = wfTimestamp( TS_MW, $ts );
diff --git a/includes/specialpage/QueryPage.php
b/includes/specialpage/QueryPage.php
index b8fc05e..f71752c 100644
--- a/includes/specialpage/QueryPage.php
+++ b/includes/specialpage/QueryPage.php
@@ -60,7 +60,6 @@
* @return array
*/
public static function getPages() {
- global $wgDisableCounters;
static $qp = null;
if ( $qp === null ) {
@@ -101,10 +100,6 @@
array( 'WithoutInterwikiPage',
'Withoutinterwiki' ),
);
wfRunHooks( 'wgQueryPages', array( &$qp ) );
-
- if ( !$wgDisableCounters ) {
- $qp[] = array( 'PopularPagesPage',
'Popularpages' );
- }
}
return $qp;
diff --git a/includes/specialpage/SpecialPageFactory.php
b/includes/specialpage/SpecialPageFactory.php
index 07b6b4e..31901c2 100644
--- a/includes/specialpage/SpecialPageFactory.php
+++ b/includes/specialpage/SpecialPageFactory.php
@@ -182,16 +182,12 @@
*/
static function getList() {
global $wgSpecialPages;
- global $wgDisableCounters, $wgDisableInternalSearch,
$wgEmailAuthentication;
+ global $wgDisableInternalSearch, $wgEmailAuthentication;
global $wgEnableEmail, $wgEnableJavaScriptTest;
global $wgPageLanguageUseDB;
if ( !is_object( self::$list ) ) {
wfProfileIn( __METHOD__ );
-
- if ( !$wgDisableCounters ) {
- self::$list['Popularpages'] =
'PopularPagesPage';
- }
if ( !$wgDisableInternalSearch ) {
self::$list['Search'] = 'SpecialSearch';
diff --git a/includes/specials/SpecialPopularpages.php
b/includes/specials/SpecialPopularpages.php
deleted file mode 100644
index 2a80f65..0000000
--- a/includes/specials/SpecialPopularpages.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-/**
- * Implements Special:PopularPages
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup SpecialPage
- */
-
-/**
- * A special page that list most viewed pages
- *
- * @ingroup SpecialPage
- */
-class PopularPagesPage extends QueryPage {
- function __construct( $name = 'Popularpages' ) {
- parent::__construct( $name );
- }
-
- function isExpensive() {
- # page_counter is not indexed
- return true;
- }
-
- function isSyndicated() {
- return false;
- }
-
- function getQueryInfo() {
- return array(
- 'tables' => array( 'page' ),
- 'fields' => array(
- 'namespace' => 'page_namespace',
- 'title' => 'page_title',
- 'value' => 'page_counter' ),
- 'conds' => array(
- 'page_is_redirect' => 0,
- 'page_namespace' =>
MWNamespace::getContentNamespaces()
- )
- );
- }
-
- /**
- * @param Skin $skin
- * @param object $result Result row
- * @return string
- */
- function formatResult( $skin, $result ) {
- global $wgContLang;
-
- $title = Title::makeTitleSafe( $result->namespace,
$result->title );
- if ( !$title ) {
- return Html::element(
- 'span',
- array( 'class' => 'mw-invalidtitle' ),
- Linker::getInvalidTitleDescription(
- $this->getContext(),
- $result->namespace,
- $result->title )
- );
- }
-
- $link = Linker::linkKnown(
- $title,
- htmlspecialchars( $wgContLang->convert(
$title->getPrefixedText() ) )
- );
- $nv = $this->msg( 'nviews' )->numParams( $result->value
)->escaped();
-
- return $this->getLanguage()->specialList( $link, $nv );
- }
-
- protected function getGroupName() {
- return 'wiki';
- }
-}
diff --git a/includes/specials/SpecialStatistics.php
b/includes/specials/SpecialStatistics.php
index 371e5ea..4e72809 100644
--- a/includes/specials/SpecialStatistics.php
+++ b/includes/specials/SpecialStatistics.php
@@ -28,7 +28,7 @@
* @ingroup SpecialPage
*/
class SpecialStatistics extends SpecialPage {
- private $views, $edits, $good, $images, $total, $users,
+ private $edits, $good, $images, $total, $users,
$activeUsers = 0;
public function __construct() {
@@ -36,12 +36,11 @@
}
public function execute( $par ) {
- global $wgMemc, $wgDisableCounters, $wgMiserMode;
+ global $wgMemc, $wgMiserMode;
$this->setHeaders();
$this->getOutput()->addModuleStyles( 'mediawiki.special' );
- $this->views = SiteStats::views();
$this->edits = SiteStats::edits();
$this->good = SiteStats::articles();
$this->images = SiteStats::images();
@@ -49,12 +48,6 @@
$this->users = SiteStats::users();
$this->activeUsers = SiteStats::activeUsers();
$this->hook = '';
-
- # Staticic - views
- $viewsStats = '';
- if ( !$wgDisableCounters ) {
- $viewsStats = $this->getViewsStats();
- }
# Set active user count
if ( !$wgMiserMode ) {
@@ -80,12 +73,6 @@
# Statistic - usergroups
$text .= $this->getGroupStats();
- $text .= $viewsStats;
-
- # Statistic - popular pages
- if ( !$wgDisableCounters && !$wgMiserMode ) {
- $text .= $this->getMostViewedPages();
- }
# Statistic - other
$extraStats = array();
@@ -232,63 +219,6 @@
$text .= $this->formatRow( $grouppage . ' ' .
$grouplink,
$this->getLanguage()->formatNum( $countUsers ),
array( 'class' => 'statistics-group-' .
Sanitizer::escapeClass( $group ) . $classZero ) );
- }
-
- return $text;
- }
-
- private function getViewsStats() {
- return Xml::openElement( 'tr' ) .
- Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg(
'statistics-header-views' )->parse() ) .
- Xml::closeElement( 'tr' ) .
- $this->formatRow( $this->msg(
'statistics-views-total' )->parse(),
- $this->getLanguage()->formatNum(
$this->views ),
- array( 'class' =>
'mw-statistics-views-total' ), 'statistics-views-total-desc' ) .
- $this->formatRow( $this->msg(
'statistics-views-peredit' )->parse(),
- $this->getLanguage()->formatNum(
sprintf( '%.2f', $this->edits ?
- $this->views / $this->edits : 0
) ),
- array( 'class' =>
'mw-statistics-views-peredit' ) );
- }
-
- private function getMostViewedPages() {
- $text = '';
- $dbr = wfGetDB( DB_SLAVE );
- $res = $dbr->select(
- 'page',
- array(
- 'page_namespace',
- 'page_title',
- 'page_counter',
- ),
- array(
- 'page_is_redirect' => 0,
- 'page_counter > 0',
- ),
- __METHOD__,
- array(
- 'ORDER BY' => 'page_counter DESC',
- 'LIMIT' => 10,
- )
- );
-
- if ( $res->numRows() > 0 ) {
- $text .= Xml::openElement( 'tr' );
- $text .= Xml::tags(
- 'th',
- array( 'colspan' => '2' ),
- $this->msg( 'statistics-mostpopular' )->parse()
- );
- $text .= Xml::closeElement( 'tr' );
-
- foreach ( $res as $row ) {
- $title = Title::makeTitleSafe(
$row->page_namespace, $row->page_title );
-
- if ( $title instanceof Title ) {
- $text .= $this->formatRow(
Linker::link( $title ),
-
$this->getLanguage()->formatNum( $row->page_counter ) );
- }
- }
- $res->free();
}
return $text;
diff --git a/maintenance/archives/patch-hitcounter.sql
b/maintenance/archives/patch-hitcounter.sql
deleted file mode 100644
index c87c959..0000000
--- a/maintenance/archives/patch-hitcounter.sql
+++ /dev/null
@@ -1,9 +0,0 @@
---
--- hitcounter table is used to buffer page hits before they are periodically
--- counted and added to the cur_counter column in the cur table.
--- December 2003
---
-
-CREATE TABLE /*$wgDBprefix*/hitcounter (
- hc_id INTEGER UNSIGNED NOT NULL
-) ENGINE=HEAP MAX_ROWS=25000;
diff --git a/maintenance/dictionary/mediawiki.dic
b/maintenance/dictionary/mediawiki.dic
index 81bc06e..6bc91ff 100644
--- a/maintenance/dictionary/mediawiki.dic
+++ b/maintenance/dictionary/mediawiki.dic
@@ -1799,7 +1799,6 @@
historywarning
hit
hitcount
-hitcounter
hits
hmac
hmtl
diff --git a/maintenance/initSiteStats.php b/maintenance/initSiteStats.php
index 49e0e9d..cac33ec 100644
--- a/maintenance/initSiteStats.php
+++ b/maintenance/initSiteStats.php
@@ -34,11 +34,7 @@
public function __construct() {
parent::__construct();
$this->mDescription = "Re-initialise the site statistics
tables";
- $this->addOption(
- 'update',
- 'Update the existing statistics (preserves the
ss_total_views field)'
- );
- $this->addOption( 'noviews', "Don't update the page view
counter" );
+ $this->addOption( 'update', 'Update the existing statistics' );
$this->addOption( 'active', 'Also update active users count' );
$this->addOption( 'use-master', 'Count using the master
database' );
}
@@ -62,12 +58,6 @@
$image = $counter->files();
$this->output( "{$image}\n" );
-
- if ( !$this->hasOption( 'noviews' ) ) {
- $this->output( "Counting total page views..." );
- $views = $counter->views();
- $this->output( "{$views}\n" );
- }
if ( $this->hasOption( 'update' ) ) {
$this->output( "\nUpdating site statistics..." );
diff --git a/maintenance/mssql/tables.sql b/maintenance/mssql/tables.sql
index daaa81ee..062ef7d 100644
--- a/maintenance/mssql/tables.sql
+++ b/maintenance/mssql/tables.sql
@@ -422,9 +422,6 @@
-- The single row should contain 1 here.
ss_row_id int NOT NULL,
- -- Total number of page views, if hit counters are enabled.
- ss_total_views bigint default 0,
-
-- Total number of edits performed.
ss_total_edits bigint default 0,
@@ -450,18 +447,6 @@
-- Pointless index to assuage developer superstitions
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-
-
---
--- Stores an ID for every time any article is visited;
--- depending on $wgHitcounterUpdateFreq, it is
--- periodically cleared and the page_counter column
--- in the page table updated for all the articles
--- that have been visited.)
---
-CREATE TABLE /*_*/hitcounter (
- hc_id int NOT NULL
-);
--
diff --git a/maintenance/oracle/tables.sql b/maintenance/oracle/tables.sql
index 1e0fa40..b9943f2 100644
--- a/maintenance/oracle/tables.sql
+++ b/maintenance/oracle/tables.sql
@@ -247,7 +247,6 @@
CREATE TABLE &mw_prefix.site_stats (
ss_row_id NUMBER NOT NULL ,
- ss_total_views NUMBER DEFAULT 0,
ss_total_edits NUMBER DEFAULT 0,
ss_good_articles NUMBER DEFAULT 0,
ss_total_pages NUMBER DEFAULT -1,
@@ -256,10 +255,6 @@
ss_images NUMBER DEFAULT 0
);
CREATE UNIQUE INDEX &mw_prefix.site_stats_u01 ON &mw_prefix.site_stats
(ss_row_id);
-
-CREATE TABLE &mw_prefix.hitcounter (
- hc_id NUMBER NOT NULL
-);
CREATE SEQUENCE ipblocks_ipb_id_seq;
CREATE TABLE &mw_prefix.ipblocks (
diff --git a/maintenance/postgres/compare_schemas.pl
b/maintenance/postgres/compare_schemas.pl
index 53aeb14..bb08237 100644
--- a/maintenance/postgres/compare_schemas.pl
+++ b/maintenance/postgres/compare_schemas.pl
@@ -395,7 +395,6 @@
ss_good_articles bigint INTEGER
ss_total_edits bigint INTEGER
ss_total_pages bigint INTEGER
-ss_total_views bigint INTEGER
ss_users bigint INTEGER
## True IP - keep an eye on these, coders tend to make textual assumptions
diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql
index 400050e..e6e8d8c 100644
--- a/maintenance/postgres/tables.sql
+++ b/maintenance/postgres/tables.sql
@@ -262,7 +262,6 @@
CREATE TABLE site_stats (
ss_row_id INTEGER NOT NULL UNIQUE,
- ss_total_views INTEGER DEFAULT 0,
ss_total_edits INTEGER DEFAULT 0,
ss_good_articles INTEGER DEFAULT 0,
ss_total_pages INTEGER DEFAULT -1,
@@ -270,10 +269,6 @@
ss_active_users INTEGER DEFAULT -1,
ss_admins INTEGER DEFAULT -1,
ss_images INTEGER DEFAULT 0
-);
-
-CREATE TABLE hitcounter (
- hc_id BIGINT NOT NULL
);
diff --git a/maintenance/showSiteStats.php b/maintenance/showSiteStats.php
index 374a66e..370d14e 100644
--- a/maintenance/showSiteStats.php
+++ b/maintenance/showSiteStats.php
@@ -44,7 +44,6 @@
public function execute() {
$fields = array(
- 'ss_total_views' => 'Total views',
'ss_total_edits' => 'Total edits',
'ss_good_articles' => 'Number of articles',
'ss_total_pages' => 'Total pages',
diff --git a/maintenance/sqlite/archives/initial-indexes.sql
b/maintenance/sqlite/archives/initial-indexes.sql
index 954c85d..093a335 100644
--- a/maintenance/sqlite/archives/initial-indexes.sql
+++ b/maintenance/sqlite/archives/initial-indexes.sql
@@ -164,7 +164,6 @@
CREATE TABLE /*_*/site_stats_tmp (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
diff --git a/maintenance/sqlite/archives/patch-drop-ss_admins.sql
b/maintenance/sqlite/archives/patch-drop-ss_admins.sql
index 9951e17..3960663 100644
--- a/maintenance/sqlite/archives/patch-drop-ss_admins.sql
+++ b/maintenance/sqlite/archives/patch-drop-ss_admins.sql
@@ -1,7 +1,6 @@
-- field is deprecated and no longer updated as of 1.5
CREATE TABLE /*_*/site_stats_tmp (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
@@ -11,7 +10,7 @@
) /*$wgDBTableOptions*/;
INSERT INTO /*_*/site_stats_tmp
- SELECT ss_row_id, ss_total_views, ss_total_edits, ss_good_articles,
+ SELECT ss_row_id, ss_total_edits, ss_good_articles,
ss_total_pages, ss_users, ss_active_users, ss_images
FROM /*_*/site_stats;
diff --git a/maintenance/tables.sql b/maintenance/tables.sql
index 4b9a5e2..7fc5784 100644
--- a/maintenance/tables.sql
+++ b/maintenance/tables.sql
@@ -241,9 +241,6 @@
-- can move or edit the page.
page_restrictions tinyblob NOT NULL,
- -- Number of times this page has been viewed.
- page_counter bigint unsigned NOT NULL default 0,
-
-- 1 indicates the article is a redirect.
page_is_redirect tinyint unsigned NOT NULL default 0,
@@ -697,9 +694,6 @@
-- The single row should contain 1 here.
ss_row_id int unsigned NOT NULL,
- -- Total number of page views, if hit counters are enabled.
- ss_total_views bigint unsigned default 0,
-
-- Total number of edits performed.
ss_total_edits bigint unsigned default 0,
@@ -725,19 +719,6 @@
-- Pointless index to assuage developer superstitions
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-
-
---
--- Stores an ID for every time any article is visited;
--- depending on $wgHitcounterUpdateFreq, it is
--- periodically cleared and the page_counter column
--- in the page table updated for all the articles
--- that have been visited.)
---
-CREATE TABLE /*_*/hitcounter (
- hc_id int unsigned NOT NULL
-) ENGINE=HEAP MAX_ROWS=25000;
-
--
-- The internet is full of jerks, alas. Sometimes it's handy
diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index e76b9df..4f81cbb 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -909,7 +909,7 @@
$tables = array( 'user', 'user_properties',
'user_former_groups', 'page', 'page_restrictions',
'protected_titles', 'revision', 'text', 'pagelinks',
'imagelinks',
'categorylinks', 'templatelinks', 'externallinks',
'langlinks', 'iwlinks',
- 'site_stats', 'hitcounter', 'ipblocks', 'image',
'oldimage',
+ 'site_stats', 'ipblocks', 'image', 'oldimage',
'recentchanges', 'watchlist', 'interwiki', 'logging',
'querycache', 'objectcache', 'job', 'l10n_cache',
'redirect', 'querycachetwo',
'archive', 'user_groups', 'page_props', 'category',
'msg_resource', 'msg_resource_links'
diff --git a/tests/phpunit/data/db/sqlite/tables-1.13.sql
b/tests/phpunit/data/db/sqlite/tables-1.13.sql
index 2efb7a0..ab66da4 100644
--- a/tests/phpunit/data/db/sqlite/tables-1.13.sql
+++ b/tests/phpunit/data/db/sqlite/tables-1.13.sql
@@ -114,17 +114,12 @@
CREATE TABLE /*$wgDBprefix*/site_stats (
ss_row_id INTEGER ,
- ss_total_views bigint default '0',
ss_total_edits bigint default '0',
ss_good_articles bigint default '0',
ss_total_pages bigint default '-1',
ss_users bigint default '-1',
ss_admins INTEGER default '-1',
ss_images INTEGER default '0') /*$wgDBTableOptions*/;
-
-CREATE TABLE /*$wgDBprefix*/hitcounter (
- hc_id INTEGER
-);
CREATE TABLE /*$wgDBprefix*/ipblocks (
ipb_id INTEGER PRIMARY KEY AUTOINCREMENT,
diff --git a/tests/phpunit/data/db/sqlite/tables-1.15.sql
b/tests/phpunit/data/db/sqlite/tables-1.15.sql
index 6b3a628..7f410f8 100644
--- a/tests/phpunit/data/db/sqlite/tables-1.15.sql
+++ b/tests/phpunit/data/db/sqlite/tables-1.15.sql
@@ -149,7 +149,6 @@
CREATE INDEX /*i*/ll_lang ON /*_*/langlinks (ll_lang, ll_title);
CREATE TABLE /*_*/site_stats (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
@@ -159,9 +158,6 @@
ss_images int default 0
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-CREATE TABLE /*_*/hitcounter (
- hc_id int unsigned NOT NULL
-) ENGINE=HEAP MAX_ROWS=25000;
CREATE TABLE /*_*/ipblocks (
ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipb_address tinyblob NOT NULL,
diff --git a/tests/phpunit/data/db/sqlite/tables-1.16.sql
b/tests/phpunit/data/db/sqlite/tables-1.16.sql
index 7e8f30e..58626c8 100644
--- a/tests/phpunit/data/db/sqlite/tables-1.16.sql
+++ b/tests/phpunit/data/db/sqlite/tables-1.16.sql
@@ -46,7 +46,6 @@
page_namespace int NOT NULL,
page_title varchar(255) binary NOT NULL,
page_restrictions tinyblob NOT NULL,
- page_counter bigint unsigned NOT NULL default 0,
page_is_redirect tinyint unsigned NOT NULL default 0,
page_is_new tinyint unsigned NOT NULL default 0,
page_random real unsigned NOT NULL,
@@ -155,7 +154,6 @@
CREATE INDEX /*i*/ll_lang ON /*_*/langlinks (ll_lang, ll_title);
CREATE TABLE /*_*/site_stats (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
@@ -165,9 +163,6 @@
ss_images int default 0
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-CREATE TABLE /*_*/hitcounter (
- hc_id int unsigned NOT NULL
-) ENGINE=HEAP MAX_ROWS=25000;
CREATE TABLE /*_*/ipblocks (
ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipb_address tinyblob NOT NULL,
diff --git a/tests/phpunit/data/db/sqlite/tables-1.17.sql
b/tests/phpunit/data/db/sqlite/tables-1.17.sql
index e02e3e1..f5b58f2 100644
--- a/tests/phpunit/data/db/sqlite/tables-1.17.sql
+++ b/tests/phpunit/data/db/sqlite/tables-1.17.sql
@@ -46,7 +46,6 @@
page_namespace int NOT NULL,
page_title varchar(255) binary NOT NULL,
page_restrictions tinyblob NOT NULL,
- page_counter bigint unsigned NOT NULL default 0,
page_is_redirect tinyint unsigned NOT NULL default 0,
page_is_new tinyint unsigned NOT NULL default 0,
page_random real unsigned NOT NULL,
@@ -167,7 +166,6 @@
CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix,
iwl_title, iwl_from);
CREATE TABLE /*_*/site_stats (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
@@ -177,9 +175,6 @@
ss_images int default 0
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-CREATE TABLE /*_*/hitcounter (
- hc_id int unsigned NOT NULL
-) ENGINE=HEAP MAX_ROWS=25000;
CREATE TABLE /*_*/ipblocks (
ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipb_address tinyblob NOT NULL,
diff --git a/tests/phpunit/data/db/sqlite/tables-1.18.sql
b/tests/phpunit/data/db/sqlite/tables-1.18.sql
index 8bfc28e..ae1ad33 100644
--- a/tests/phpunit/data/db/sqlite/tables-1.18.sql
+++ b/tests/phpunit/data/db/sqlite/tables-1.18.sql
@@ -52,7 +52,6 @@
page_namespace int NOT NULL,
page_title varchar(255) binary NOT NULL,
page_restrictions tinyblob NOT NULL,
- page_counter bigint unsigned NOT NULL default 0,
page_is_redirect tinyint unsigned NOT NULL default 0,
page_is_new tinyint unsigned NOT NULL default 0,
page_random real unsigned NOT NULL,
@@ -173,7 +172,6 @@
CREATE UNIQUE INDEX /*i*/iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix,
iwl_title, iwl_from);
CREATE TABLE /*_*/site_stats (
ss_row_id int unsigned NOT NULL,
- ss_total_views bigint unsigned default 0,
ss_total_edits bigint unsigned default 0,
ss_good_articles bigint unsigned default 0,
ss_total_pages bigint default '-1',
@@ -183,9 +181,6 @@
ss_images int default 0
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/ss_row_id ON /*_*/site_stats (ss_row_id);
-CREATE TABLE /*_*/hitcounter (
- hc_id int unsigned NOT NULL
-) ENGINE=HEAP MAX_ROWS=25000;
CREATE TABLE /*_*/ipblocks (
ipb_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
ipb_address tinyblob NOT NULL,
--
To view, visit https://gerrit.wikimedia.org/r/150699
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e5006a7e8a09c800f8fa4effa9399e8afdd7a57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits