Index: branches/REL1_17/phase3/maintenance/update.php |
— | — | @@ -87,10 +87,14 @@ |
88 | 88 | } |
89 | 89 | |
90 | 90 | $shared = $this->hasOption( 'doshared' ); |
91 | | - $purge = !$this->hasOption( 'nopurge' ); |
92 | 91 | |
| 92 | + $updates = array('core','extensions'); |
| 93 | + if( !$this->hasOption('nopurge') ) { |
| 94 | + $updates[] = 'purge'; |
| 95 | + } |
| 96 | + |
93 | 97 | $updater = DatabaseUpdater::newForDb( $db, $shared, $this ); |
94 | | - $updater->doUpdates( $purge ); |
| 98 | + $updater->doUpdates( $updates ); |
95 | 99 | |
96 | 100 | foreach( $updater->getPostDatabaseUpdateMaintenance() as $maint ) { |
97 | 101 | $child = $this->runChild( $maint ); |
Property changes on: branches/REL1_17/phase3/maintenance/update.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
98 | 102 | Merged /branches/sqlite/maintenance/update.php:r58211-58321 |
99 | 103 | Merged /trunk/phase3/maintenance/update.php:r79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,81519,85047 |
100 | 104 | Merged /branches/new-installer/phase3/maintenance/update.php:r43664-66004 |
101 | 105 | Merged /branches/REL1_15/phase3/maintenance/update.php:r51646 |
Index: branches/REL1_17/phase3/includes/db/Database.php |
— | — | @@ -737,7 +737,10 @@ |
738 | 738 | $sqlx = strtr( $sqlx, "\t\n", ' ' ); |
739 | 739 | global $wgRequestTime; |
740 | 740 | $elapsed = round( microtime( true ) - $wgRequestTime, 3 ); |
741 | | - wfLogDBError( "Connection lost and reconnected after {$elapsed}s, query: $sqlx\n" ); |
| 741 | + if ( $elapsed < 300 ) { |
| 742 | + # Not a database error to lose a transaction after a minute or two |
| 743 | + wfLogDBError( "Connection lost and reconnected after {$elapsed}s, query: $sqlx\n" ); |
| 744 | + } |
742 | 745 | $ret = $this->doQuery( $commentedSql ); |
743 | 746 | } else { |
744 | 747 | wfDebug( "Failed\n" ); |
— | — | @@ -1625,7 +1628,7 @@ |
1626 | 1629 | if ( !$alias || $alias == $name ) { |
1627 | 1630 | return $this->tableName( $name ); |
1628 | 1631 | } else { |
1629 | | - return $this->tableName( $name ) . ' ' . $this->addIdentifierQuotes( $alias ); |
| 1632 | + return $this->tableName( $name ) . ' ' . $this->addQuotes( $alias ); |
1630 | 1633 | } |
1631 | 1634 | } |
1632 | 1635 | |
Property changes on: branches/REL1_17/phase3/includes/db/Database.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1633 | 1636 | Merged /branches/wmf/1.16wmf4/includes/db/Database.php:r67177 |
1634 | 1637 | Merged /trunk/phase3/includes/db/Database.php:r81755,82596 |
Index: branches/REL1_17/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -189,21 +189,28 @@ |
190 | 190 | /** |
191 | 191 | * Do all the updates |
192 | 192 | * |
193 | | - * @param $purge Boolean: whether to clear the objectcache table after updates |
| 193 | + * @param $what Array: what updates to perform |
194 | 194 | */ |
195 | | - public function doUpdates( $purge = true ) { |
| 195 | + public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) { |
196 | 196 | global $wgVersion; |
197 | 197 | |
198 | | - $this->runUpdates( $this->getCoreUpdateList(), false ); |
199 | | - $this->runUpdates( $this->getOldGlobalUpdates(), false ); |
200 | | - $this->runUpdates( $this->getExtensionUpdates(), true ); |
| 198 | + $what = array_flip( $what ); |
| 199 | + if ( isset( $what['core'] ) ) { |
| 200 | + $this->runUpdates( $this->getCoreUpdateList(), false ); |
| 201 | + } |
| 202 | + if ( isset( $what['extensions'] ) ) { |
| 203 | + $this->runUpdates( $this->getOldGlobalUpdates(), false ); |
| 204 | + $this->runUpdates( $this->getExtensionUpdates(), true ); |
| 205 | + } |
201 | 206 | |
202 | 207 | $this->setAppliedUpdates( $wgVersion, $this->updates ); |
203 | 208 | |
204 | | - if( $purge ) { |
| 209 | + if( isset( $what['purge'] ) ) { |
205 | 210 | $this->purgeCache(); |
206 | 211 | } |
207 | | - $this->checkStats(); |
| 212 | + if ( isset( $what['core'] ) ) { |
| 213 | + $this->checkStats(); |
| 214 | + } |
208 | 215 | } |
209 | 216 | |
210 | 217 | /** |
Index: branches/REL1_17/phase3/includes/installer/OracleUpdater.php |
— | — | @@ -83,8 +83,8 @@ |
84 | 84 | /** |
85 | 85 | * Overload: after this action field info table has to be rebuilt |
86 | 86 | */ |
87 | | - public function doUpdates( $purge = true ) { |
88 | | - parent::doUpdates(); |
| 87 | + public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) { |
| 88 | + parent::doUpdates( $what ); |
89 | 89 | |
90 | 90 | $this->db->query( 'BEGIN fill_wiki_info; END;' ); |
91 | 91 | } |
Index: branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php |
— | — | @@ -202,6 +202,10 @@ |
203 | 203 | } |
204 | 204 | } |
205 | 205 | } |
| 206 | + |
| 207 | + // Now run updates to create tables for old extensions |
| 208 | + $updater->doUpdates( array( 'extensions' ) ); |
| 209 | + |
206 | 210 | return $status; |
207 | 211 | } |
208 | 212 | |
Property changes on: branches/REL1_17/phase3/includes/installer/DatabaseInstaller.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
209 | 213 | Merged /trunk/phase3/includes/installer/DatabaseInstaller.php:r85021,85066 |
Index: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -114,6 +114,27 @@ |
115 | 115 | protected function getFieldsetEnd() { |
116 | 116 | return "</fieldset>\n"; |
117 | 117 | } |
| 118 | + |
| 119 | + /** |
| 120 | + * Opens a textarea used to display the progress of a long operation |
| 121 | + */ |
| 122 | + protected function startLiveBox() { |
| 123 | + $this->addHTML( |
| 124 | + '<div id="config-spinner" style="display:none;"><img src="../skins/common/images/ajax-loader.gif" /></div>' . |
| 125 | + '<script>jQuery( "#config-spinner" ).show();</script>' . |
| 126 | + '<textarea id="config-live-log" name="LiveLog" rows="10" cols="30" readonly="readonly">' |
| 127 | + ); |
| 128 | + $this->parent->output->flush(); |
| 129 | + } |
| 130 | + |
| 131 | + /** |
| 132 | + * Opposite to startLiveBox() |
| 133 | + */ |
| 134 | + protected function endLiveBox() { |
| 135 | + $this->addHTML( '</textarea> |
| 136 | +<script>jQuery( "#config-spinner" ).hide()</script>' ); |
| 137 | + $this->parent->output->flush(); |
| 138 | + } |
118 | 139 | } |
119 | 140 | |
120 | 141 | class WebInstaller_Language extends WebInstallerPage { |
— | — | @@ -464,16 +485,11 @@ |
465 | 486 | |
466 | 487 | if ( $this->parent->request->wasPosted() ) { |
467 | 488 | $installer->preUpgrade(); |
468 | | - $this->addHTML( |
469 | | - '<div id="config-spinner" style="display:none;"><img src="../skins/common/images/ajax-loader.gif" /></div>' . |
470 | | - '<script>jQuery( "#config-spinner" )[0].style.display = "block";</script>' . |
471 | | - '<textarea id="config-update-log" name="UpdateLog" rows="10" readonly="readonly">' |
472 | | - ); |
473 | | - $this->parent->output->flush(); |
| 489 | + |
| 490 | + $this->startLiveBox(); |
474 | 491 | $result = $installer->doUpgrade(); |
475 | | - $this->addHTML( '</textarea> |
476 | | -<script>jQuery( "#config-spinner" )[0].style.display = "none";</script>' ); |
477 | | - $this->parent->output->flush(); |
| 492 | + $this->endLiveBox(); |
| 493 | + |
478 | 494 | if ( $result ) { |
479 | 495 | // If they're going to possibly regenerate LocalSettings, we |
480 | 496 | // need to create the upgrade/secret keys. Bug 26481 |
— | — | @@ -1081,9 +1097,15 @@ |
1082 | 1098 | |
1083 | 1099 | public function startStage( $step ) { |
1084 | 1100 | $this->addHTML( "<li>" . wfMsgHtml( "config-install-$step" ) . wfMsg( 'ellipsis') ); |
| 1101 | + if ( $step == 'extension-tables' ) { |
| 1102 | + $this->startLiveBox(); |
| 1103 | + } |
1085 | 1104 | } |
1086 | 1105 | |
1087 | 1106 | public function endStage( $step, $status ) { |
| 1107 | + if ( $step == 'extension-tables' ) { |
| 1108 | + $this->endLiveBox(); |
| 1109 | + } |
1088 | 1110 | $msg = $status->isOk() ? 'config-install-step-done' : 'config-install-step-failed'; |
1089 | 1111 | $html = wfMsgHtml( 'word-separator' ) . wfMsgHtml( $msg ); |
1090 | 1112 | if ( !$status->isOk() ) { |
Property changes on: branches/REL1_17/phase3/includes/installer/WebInstallerPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1091 | 1113 | Merged /trunk/phase3/includes/installer/WebInstallerPage.php:r85021,85066 |
Property changes on: branches/REL1_17/phase3/includes/installer |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1092 | 1114 | Merged /trunk/phase3/includes/installer:r85021,85066 |