'wgDBmwschema',
);
+ protected $internalDefaults = array(
+ '_InstallUser' => 'db2admin'
+ );
+
/**
* Get the DB2 database extension name
* @return string
* Open a DB2 database connection
* @return Status
*/
- public function openConnection( $dbName = null ) {
+ public function openConnection() {
$status = Status::newGood();
try {
$db = new DatabaseIbm_db2(
if ( !$status->isOK() ) {
return $status;
}
+ /**
+ * @var $conn DatabaseBase
+ */
$conn = $status->value;
$dbName = $this->getVar( 'wgDBname' );
if( !$conn->selectDB( $dbName ) ) {
$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__ );
$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', '' );
}
public function __construct($parent) {
parent::__construct($parent);
}
-}
\ No newline at end of file
+}