Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -83,6 +83,7 @@ |
84 | 84 | array( 'oldimage', 'oi_metadata', 'patch-oi_metadata.sql'), |
85 | 85 | array( 'archive', 'ar_page_id', 'patch-archive-page_id.sql'), |
86 | 86 | array( 'image', 'img_sha1', 'patch-img_sha1.sql' ), |
| 87 | + array( 'revision', 'rev_bot', 'patch-rev_bot.sql' ), |
87 | 88 | ); |
88 | 89 | |
89 | 90 | # For extensions only, should be populated via hooks |
— | — | @@ -1031,6 +1032,8 @@ |
1032 | 1033 | |
1033 | 1034 | do_oldimage_user_index(); flush (); |
1034 | 1035 | |
| 1036 | + do_revision_page_user_index(); flush (); |
| 1037 | + |
1035 | 1038 | echo "Deleting old default messages (this may take a long time!)..."; flush(); |
1036 | 1039 | deleteDefaultMessages(); |
1037 | 1040 | echo "Done\n"; flush(); |
— | — | @@ -1129,6 +1132,17 @@ |
1130 | 1133 | |
1131 | 1134 | } |
1132 | 1135 | |
| 1136 | +function do_revision_page_user_index() { |
| 1137 | + global $wgDatabase; |
| 1138 | + if( $wgDatabase->indexExists( 'revision', 'page_user_timestamp' ) ) { |
| 1139 | + echo "...page,user,timestamp key on revision already exists.\n"; |
| 1140 | + } else { |
| 1141 | + echo "Adding page,user,timestamp key on revision table... "; |
| 1142 | + dbsource( archive("patch-revision-user-page-index.sql"), $wgDatabase ); |
| 1143 | + echo "ok\n"; |
| 1144 | + } |
| 1145 | +} |
| 1146 | + |
1133 | 1147 | function |
1134 | 1148 | pg_describe_table($table) |
1135 | 1149 | { |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -270,6 +270,9 @@ |
271 | 271 | -- Not yet used; reserved for future changes to the deletion system. |
272 | 272 | rev_deleted tinyint unsigned NOT NULL default '0', |
273 | 273 | |
| 274 | + -- Was this edit made by a bot (and marked as such)? |
| 275 | + rev_bot tinyint unsigned NOT NULL default '0', |
| 276 | + |
274 | 277 | -- Length of this revision in bytes |
275 | 278 | rev_len int unsigned, |
276 | 279 | |
— | — | @@ -282,7 +285,8 @@ |
283 | 286 | INDEX rev_timestamp (rev_timestamp), |
284 | 287 | INDEX page_timestamp (rev_page,rev_timestamp), |
285 | 288 | INDEX user_timestamp (rev_user,rev_timestamp), |
286 | | - INDEX usertext_timestamp (rev_user_text,rev_timestamp) |
| 289 | + INDEX usertext_timestamp (rev_user_text,rev_timestamp), |
| 290 | + INDEX page_user_timestamp (rev_page,rev_user,rev_timestamp) |
287 | 291 | |
288 | 292 | ) /*$wgDBTableOptions*/ MAX_ROWS=10000000 AVG_ROW_LENGTH=1024; |
289 | 293 | -- In case tables are created as MyISAM, use row hints for MySQL <5.0 to avoid 4GB limit |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -2463,8 +2463,8 @@ |
2464 | 2464 | * |
2465 | 2465 | * @param Revision $rev |
2466 | 2466 | * |
2467 | | - * @todo This is a shitty interface function. Kill it and replace the |
2468 | | - * other shitty functions like editUpdates and such so it's not needed |
| 2467 | + * @todo This is a lousy interface function. Kill it and replace the |
| 2468 | + * other cruddy functions like editUpdates and such so it's not needed |
2469 | 2469 | * anymore. |
2470 | 2470 | */ |
2471 | 2471 | function createUpdates( $rev ) { |