Make Skin::formatDebugHTML()'s formatting work when memory usage is greather that 10M
[lhc/web/wiklou.git] / includes / installer / Ibm_db2Installer.php
index dabbe91..0f1c2a8 100644 (file)
@@ -24,6 +24,10 @@ class Ibm_db2Installer extends DatabaseInstaller {
                'wgDBmwschema',
        );
 
+       protected $internalDefaults = array(
+               '_InstallUser' => 'db2admin'
+       );
+
        /**
         * Get the DB2 database extension name
         * @return string
@@ -140,6 +144,9 @@ class Ibm_db2Installer extends DatabaseInstaller {
                if ( !$status->isOK() ) {
                        return $status;
                }
+               /**
+                * @var $conn DatabaseBase
+                */
                $conn = $status->value;
                $dbName = $this->getVar( 'wgDBname' );
                if( !$conn->selectDB( $dbName ) ) {
@@ -181,7 +188,7 @@ class Ibm_db2Installer extends DatabaseInstaller {
                $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
                $this->db->begin( __METHOD__ );
 
-               $error = $this->db->sourceFile( $this->db->getSchema() );
+               $error = $this->db->sourceFile( $this->db->getSchemaPath() );
                if( $error !== true ) {
                        $this->db->reportQueryError( $error, 0, '', __METHOD__ );
                        $this->db->rollback( __METHOD__ );
@@ -212,12 +219,13 @@ class Ibm_db2Installer extends DatabaseInstaller {
                        $result = $this->db->query( 'SELECT PAGESIZE FROM SYSCAT.TABLESPACES' );
                        if( $result == false ) {
                                $status->fatal( 'config-connection-error', '' );
-                       }
-                       else {
-                               while ( $row = $this->db->fetchRow( $result ) ) {
+                       } else {
+                               $row = $this->db->fetchRow( $result );
+                               while ( $row ) {
                                        if( $row[0] >= 32768 ) {
                                                return $status;
                                        }
+                                       $row = $this->db->fetchRow( $result );
                                }
                                $status->fatal( 'config-ibm_db2-low-db-pagesize', '' );
                        }
@@ -244,4 +252,4 @@ class Ibm_db2Installer extends DatabaseInstaller {
        public function __construct($parent) {
                parent::__construct($parent);
        }
-}
\ No newline at end of file
+}