* fixed oracle code for updater (corrected not null BLOB field adding)
authorJure Kajzer <freakolowsky@users.mediawiki.org>
Mon, 10 Jan 2011 20:11:43 +0000 (20:11 +0000)
committerJure Kajzer <freakolowsky@users.mediawiki.org>
Mon, 10 Jan 2011 20:11:43 +0000 (20:11 +0000)
* added required DB vars in WebInstaller_ExistingWiki
* oracle upgrades normally 1.16=>1.17

includes/db/DatabaseOracle.php
includes/installer/WebInstallerPage.php
maintenance/oracle/archives/patch_16_17_schema_changes.sql

index 86323d3..43ca21e 100644 (file)
@@ -917,6 +917,7 @@ class DatabaseOracle extends DatabaseBase {
         * Query whether a given table exists (in the given schema, or the default mw one if not given)
         */
        function tableExists( $table ) {
+               $table = trim($this->tableName($table), '"');
                $SQL = "SELECT 1 FROM user_tables WHERE table_name='$table'";
                $res = $this->doQuery( $SQL );
                if ( $res ) {
index a38142c..453aa27 100644 (file)
@@ -300,7 +300,7 @@ class WebInstaller_ExistingWiki extends WebInstallerPage {
                }
 
                // Set the relevant variables from LocalSettings.php
-               $requiredVars = array( 'wgDBtype', 'wgDBuser', 'wgDBpassword' );
+               $requiredVars = array( 'wgDBtype', 'wgDBuser', 'wgDBpassword', 'wgDBname', 'wgDBserver' );
                $status = $this->importVariables( $requiredVars , $vars );
                $installer = $this->parent->getDBInstaller();
                $status->merge( $this->importVariables( $installer->getGlobalNames(), $vars ) );
index a315215..c3214b9 100644 (file)
@@ -31,7 +31,8 @@ ALTER TABLE &mw_prefix.image MODIFY img_height DEFAULT 0;
 ALTER TABLE &mw_prefix.image MODIFY img_bits DEFAULT 0 NOT NULL;
 ALTER TABLE &mw_prefix.image MODIFY img_user DEFAULT 0 NOT NULL;
 
-ALTER TABLE &mw_prefix.interwiki ADD iw_api BLOB NOT NULL;
+ALTER TABLE &mw_prefix.interwiki ADD iw_api BLOB DEFAULT EMPTY_BLOB();
+ALTER TABLE &mw_prefix.interwiki MODIFY iw_api DEFAULT NULL NOT NULL;
 ALTER TABLE &mw_prefix.interwiki ADD iw_wikiid VARCHAR2(64);
 
 ALTER TABLE &mw_prefix.ipblocks MODIFY ipb_user DEFAULT 0 NOT NULL;