define( 'DBO_DEFAULT', 16 );
define( 'DBO_PERSISTENT', 32 );
define( 'DBO_SYSDBA', 64 ); //for oracle maintenance
+define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
/**@}*/
/**@{
// handle some oracle specifics
// remove AS column/table/subquery namings
- if ( !defined( 'MEDIAWIKI_INSTALL' ) ) {
+ if( !$this->getFlag( DBO_DDLMODE ) ) {
$sql = preg_replace( '/ as /i', ' ', $sql );
}
+
// Oracle has issues with UNION clause if the statement includes LOB fields
// So we do a UNION ALL and then filter the results array with array_unique
$union_unique = ( preg_match( '/\/\* UNION_UNIQUE \*\/ /', $sql ) != 0 );
*/
protected function __construct( DatabaseBase &$db, $shared, Maintenance $maintenance = null ) {
$this->db = $db;
+ $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
$this->shared = $shared;
if ( $maintenance ) {
$this->maintenance = $maintenance;
* @since 1.17
*/
class OracleUpdater extends DatabaseUpdater {
-
- protected function __construct( DatabaseBase &$db, $shared ) {
- define( 'MEDIAWIKI_INSTALL', true );
- parent::__construct( $db, $shared );
- }
-
protected function getCoreUpdateList() {
return array(
// 1.16
);
}
-
/**
* MySQL uses datatype defaults for NULL inserted into NOT NULL fields
* In namespace case that results into insert of 0 which is default namespace