r59932 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59931‎ | r59932 | r59933 >
Date:17:42, 10 December 2009
Author:maxsem
Status:ok
Tags:
Comment:
Fixed updater borkage on SQLite from r59925 and r59926, tweaked explanation for this change in updaters.inc for portability. See my comments for these revisions in CodeReview for motivation.
Modified paths:
  • /trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql (modified) (history)
  • /trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql (modified) (history)
  • /trunk/phase3/maintenance/updaters.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/sqlite/archives/patch-tc-timestamp.sql
@@ -1,4 +1,3 @@
2 -ALTER TABLE /*_*/transcache MODIFY tc_time binary(14);
3 -UPDATE /*_*/transcache SET tc_time = DATE_FORMAT(FROM_UNIXTIME(tc_time), "%Y%c%d%H%i%s");
 2+UPDATE /*_*/transcache SET tc_time = strftime('%Y%m%d%H%M%S', datetime(1260465428, 'unixepoch'));
43
54 INSERT INTO /*_*/updatelog VALUES ('convert transcache field');
Index: trunk/phase3/maintenance/sqlite/archives/initial-indexes.sql
@@ -352,7 +352,7 @@
353353 CREATE TABLE /*_*/transcache (
354354 tc_url varbinary(255) NOT NULL,
355355 tc_contents text,
356 - tc_time binary(14) NOT NULL
 356+ tc_time int NOT NULL
357357 ) /*$wgDBTableOptions*/;
358358 CREATE UNIQUE INDEX /*i*/tc_url_idx ON /*_*/transcache (tc_url);
359359
Index: trunk/phase3/maintenance/updaters.inc
@@ -1350,7 +1350,7 @@
13511351 wfOut( "...transcache tc_time already converted.\n" );
13521352 return;
13531353 } else {
1354 - wfOut( "Converting tc_time from int(11) to binary(14)... " );
 1354+ wfOut( "Converting tc_time from UNIX epoch to MediaWiki timestamp... " );
13551355 $wgDatabase->sourceFile( archive( 'patch-tc-timestamp.sql' ) );
13561356 wfOut( "ok\n" );
13571357 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r59983Whee, a debugging piece of SQL had made it through in r59932maxsem23:30, 11 December 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59925Followup to r59869, add to MySQL section, and copy patch to SQLite directoryoverlordq05:39, 10 December 2009
r59926Addendum to r59925, fix remaining straggling files that set rc_time to intoverlordq10:10, 10 December 2009

Status & tagging log