Index: trunk/phase3/includes/Defines.php |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | define( 'DBO_DEFAULT', 16 ); |
21 | 21 | define( 'DBO_PERSISTENT', 32 ); |
22 | 22 | define( 'DBO_SYSDBA', 64 ); //for oracle maintenance |
| 23 | +define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle |
23 | 24 | /**@}*/ |
24 | 25 | |
25 | 26 | /**@{ |
Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -311,9 +311,10 @@ |
312 | 312 | |
313 | 313 | // handle some oracle specifics |
314 | 314 | // remove AS column/table/subquery namings |
315 | | - if ( !defined( 'MEDIAWIKI_INSTALL' ) ) { |
| 315 | + if( !$this->getFlag( DBO_DDLMODE ) ) { |
316 | 316 | $sql = preg_replace( '/ as /i', ' ', $sql ); |
317 | 317 | } |
| 318 | + |
318 | 319 | // Oracle has issues with UNION clause if the statement includes LOB fields |
319 | 320 | // So we do a UNION ALL and then filter the results array with array_unique |
320 | 321 | $union_unique = ( preg_match( '/\/\* UNION_UNIQUE \*\/ /', $sql ) != 0 ); |
Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -48,6 +48,7 @@ |
49 | 49 | */ |
50 | 50 | protected function __construct( DatabaseBase &$db, $shared, Maintenance $maintenance = null ) { |
51 | 51 | $this->db = $db; |
| 52 | + $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files |
52 | 53 | $this->shared = $shared; |
53 | 54 | if ( $maintenance ) { |
54 | 55 | $this->maintenance = $maintenance; |
Index: trunk/phase3/includes/installer/OracleUpdater.php |
— | — | @@ -13,12 +13,6 @@ |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
16 | 16 | class OracleUpdater extends DatabaseUpdater { |
17 | | - |
18 | | - protected function __construct( DatabaseBase &$db, $shared ) { |
19 | | - define( 'MEDIAWIKI_INSTALL', true ); |
20 | | - parent::__construct( $db, $shared ); |
21 | | - } |
22 | | - |
23 | 17 | protected function getCoreUpdateList() { |
24 | 18 | return array( |
25 | 19 | // 1.16 |
— | — | @@ -29,7 +23,6 @@ |
30 | 24 | ); |
31 | 25 | } |
32 | 26 | |
33 | | - |
34 | 27 | /** |
35 | 28 | * MySQL uses datatype defaults for NULL inserted into NOT NULL fields |
36 | 29 | * In namespace case that results into insert of 0 which is default namespace |