r79954 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79953‎ | r79954 | r79955 >
Date:20:11, 10 January 2011
Author:freakolowsky
Status:ok (Comments)
Tags:
Comment:
* fixed oracle code for updater (corrected not null BLOB field adding)
* added required DB vars in WebInstaller_ExistingWiki
* oracle upgrades normally 1.16=>1.17
Modified paths:
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)
  • /trunk/phase3/maintenance/oracle/archives/patch_16_17_schema_changes.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/oracle/archives/patch_16_17_schema_changes.sql
@@ -31,7 +31,8 @@
3232 ALTER TABLE &mw_prefix.image MODIFY img_bits DEFAULT 0 NOT NULL;
3333 ALTER TABLE &mw_prefix.image MODIFY img_user DEFAULT 0 NOT NULL;
3434
35 -ALTER TABLE &mw_prefix.interwiki ADD iw_api BLOB NOT NULL;
 35+ALTER TABLE &mw_prefix.interwiki ADD iw_api BLOB DEFAULT EMPTY_BLOB();
 36+ALTER TABLE &mw_prefix.interwiki MODIFY iw_api DEFAULT NULL NOT NULL;
3637 ALTER TABLE &mw_prefix.interwiki ADD iw_wikiid VARCHAR2(64);
3738
3839 ALTER TABLE &mw_prefix.ipblocks MODIFY ipb_user DEFAULT 0 NOT NULL;
Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -917,6 +917,7 @@
918918 * Query whether a given table exists (in the given schema, or the default mw one if not given)
919919 */
920920 function tableExists( $table ) {
 921+ $table = trim($this->tableName($table), '"');
921922 $SQL = "SELECT 1 FROM user_tables WHERE table_name='$table'";
922923 $res = $this->doQuery( $SQL );
923924 if ( $res ) {
Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -300,7 +300,7 @@
301301 }
302302
303303 // Set the relevant variables from LocalSettings.php
304 - $requiredVars = array( 'wgDBtype', 'wgDBuser', 'wgDBpassword' );
 304+ $requiredVars = array( 'wgDBtype', 'wgDBuser', 'wgDBpassword', 'wgDBname', 'wgDBserver' );
305305 $status = $this->importVariables( $requiredVars , $vars );
306306 $installer = $this->parent->getDBInstaller();
307307 $status->merge( $this->importVariables( $installer->getGlobalNames(), $vars ) );

Follow-up revisions

RevisionCommit summaryAuthorDate
r80238* changed variable list as per comment on r79954 left only wgDBtype...freakolowsky07:05, 14 January 2011
r81182MFT a bunch of installer fixes. r80238, r80128, r80124, r80083, r80080, r800...demon01:59, 29 January 2011

Comments

#Comment by 😂 (talk | contribs)   23:10, 13 January 2011

Oracle changes are fine.

I actually think $requiredVars can just be wgDBtype. It's the only variable we need for getDBInstaller(), and the DB installer's getGlobalNames() should specify wgDBuser, wgDBpassword, etc etc.

#Comment by Freakolowsky (talk | contribs)   07:06, 14 January 2011

fixed in r80238.

Status & tagging log