jenkins-bot has submitted this change and it was merged.
Change subject: Remove recentchanges.rc_cur_time from sql statements
......................................................................
Remove recentchanges.rc_cur_time from sql statements
Field is unused since many versions, so remove the use in sql
statements, to allow dropping in a later version.
The field must not be reference from INSERT because it has a default
value, which is used, when no value is specified in the statement.
Keeping the field allows easier rollback on version update, when
something gets wrong with the new version.
Existing Comment in tables.sql was added with r101293, was already
disused in r11088
Bug: 40667
Change-Id: I4a9c2fa813d1f25dfb755e564f7677a212934d7b
---
M includes/changes/RecentChange.php
M maintenance/rebuildrecentchanges.php
M maintenance/tables.sql
3 files changed, 2 insertions(+), 9 deletions(-)
Approvals:
Hoo man: Looks good to me, but someone else must approve
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/changes/RecentChange.php
b/includes/changes/RecentChange.php
index 8d4c9c1..48a8d03 100644
--- a/includes/changes/RecentChange.php
+++ b/includes/changes/RecentChange.php
@@ -26,7 +26,6 @@
* mAttribs:
* rc_id id of the row in the recentchanges table
* rc_timestamp time the entry was made
- * rc_cur_time timestamp on the cur row
* rc_namespace namespace #
* rc_title non-prefixed db key
* rc_type is new entry, used to determine whether updating is
necessary
@@ -155,7 +154,6 @@
return array(
'rc_id',
'rc_timestamp',
- 'rc_cur_time',
'rc_user',
'rc_user_text',
'rc_namespace',
@@ -254,7 +252,6 @@
# Fixup database timestamps
$this->mAttribs['rc_timestamp'] = $dbw->timestamp(
$this->mAttribs['rc_timestamp'] );
- $this->mAttribs['rc_cur_time'] = $dbw->timestamp(
$this->mAttribs['rc_cur_time'] );
$this->mAttribs['rc_id'] = $dbw->nextSequenceValue(
'recentchanges_rc_id_seq' );
## If we are using foreign keys, an entry of 0 for the page_id
will fail, so use NULL
@@ -495,7 +492,6 @@
$rc->mPerformer = $user;
$rc->mAttribs = array(
'rc_timestamp' => $timestamp,
- 'rc_cur_time' => $timestamp,
'rc_namespace' => $title->getNamespace(),
'rc_title' => $title->getDBkey(),
'rc_type' => RC_EDIT,
@@ -555,7 +551,6 @@
$rc->mPerformer = $user;
$rc->mAttribs = array(
'rc_timestamp' => $timestamp,
- 'rc_cur_time' => $timestamp,
'rc_namespace' => $title->getNamespace(),
'rc_title' => $title->getDBkey(),
'rc_type' => RC_NEW,
@@ -665,7 +660,6 @@
$rc->mPerformer = $user;
$rc->mAttribs = array(
'rc_timestamp' => $timestamp,
- 'rc_cur_time' => $timestamp,
'rc_namespace' => $target->getNamespace(),
'rc_title' => $target->getDBkey(),
'rc_type' => RC_LOG,
@@ -721,7 +715,6 @@
wfDeprecated( __METHOD__, '1.22' );
$this->mAttribs = array(
'rc_timestamp' => wfTimestamp( TS_MW,
$row->rev_timestamp ),
- 'rc_cur_time' => $row->rev_timestamp,
'rc_user' => $row->rev_user,
'rc_user_text' => $row->rev_user_text,
'rc_namespace' => $row->page_namespace,
diff --git a/maintenance/rebuildrecentchanges.php
b/maintenance/rebuildrecentchanges.php
index 315176c..b9eb809 100644
--- a/maintenance/rebuildrecentchanges.php
+++ b/maintenance/rebuildrecentchanges.php
@@ -70,7 +70,6 @@
$dbw->insertSelect( 'recentchanges', array( 'page', 'revision'
),
array(
'rc_timestamp' => 'rev_timestamp',
- 'rc_cur_time' => 'rev_timestamp',
'rc_user' => 'rev_user',
'rc_user_text' => 'rev_user_text',
'rc_namespace' => 'page_namespace',
@@ -185,7 +184,6 @@
$dbw->insertSelect( 'recentchanges', array( 'user', "$logging
LEFT JOIN $page ON (log_namespace=page_namespace AND log_title=page_title)" ),
array(
'rc_timestamp' => 'log_timestamp',
- 'rc_cur_time' => 'log_timestamp',
'rc_user' => 'log_user',
'rc_user_text' => 'user_name',
'rc_namespace' => 'log_namespace',
diff --git a/maintenance/tables.sql b/maintenance/tables.sql
index af01a30..53964aa 100644
--- a/maintenance/tables.sql
+++ b/maintenance/tables.sql
@@ -1026,6 +1026,8 @@
rc_timestamp varbinary(14) NOT NULL default '',
-- This is no longer used
+ -- Field kept in database for downgrades
+ -- @todo: add drop patch with 1.24
rc_cur_time varbinary(14) NOT NULL default '',
-- As in revision
--
To view, visit https://gerrit.wikimedia.org/r/42278
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4a9c2fa813d1f25dfb755e564f7677a212934d7b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Asher <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits