Index: branches/REL1_17/phase3/maintenance/oracle/tables.sql |
— | — | @@ -610,8 +610,8 @@ |
611 | 611 | --); |
612 | 612 | --CREATE UNIQUE INDEX &mw_prefix.profiling_u01 ON &mw_prefix.profiling (pf_name, pf_server); |
613 | 613 | |
614 | | -CREATE INDEX si_title_idx ON &mw_prefix.searchindex(si_title) INDEXTYPE IS ctxsys.context; |
615 | | -CREATE INDEX si_text_idx ON &mw_prefix.searchindex(si_text) INDEXTYPE IS ctxsys.context; |
| 614 | +CREATE INDEX &mw_prefix.si_title_idx ON &mw_prefix.searchindex(si_title) INDEXTYPE IS ctxsys.context; |
| 615 | +CREATE INDEX &mw_prefix.si_text_idx ON &mw_prefix.searchindex(si_text) INDEXTYPE IS ctxsys.context; |
616 | 616 | |
617 | 617 | CREATE TABLE &mw_prefix.l10n_cache ( |
618 | 618 | lc_lang varchar2(32) NOT NULL, |
Index: branches/REL1_17/phase3/includes/search/SearchOracle.php |
— | — | @@ -246,8 +246,16 @@ |
247 | 247 | 'si_title' => $title, |
248 | 248 | 'si_text' => $text |
249 | 249 | ), 'SearchOracle::update' ); |
250 | | - $dbw->query("CALL ctx_ddl.sync_index('si_text_idx')"); |
251 | | - $dbw->query("CALL ctx_ddl.sync_index('si_title_idx')"); |
| 250 | + |
| 251 | + // Sync the index |
| 252 | + // We need to specify the DB name (i.e. user/schema) here so that |
| 253 | + // it can work from the installer, where |
| 254 | + // ALTER SESSION SET CURRENT_SCHEMA = ... |
| 255 | + // was used. |
| 256 | + $dbw->query( "CALL ctx_ddl.sync_index(" . |
| 257 | + $dbw->addQuotes( $dbw->getDBname() . '.'.$wgDBprefix.'si_text_idx' ) . ")" ); |
| 258 | + $dbw->query( "CALL ctx_ddl.sync_index(" . |
| 259 | + $dbw->addQuotes( $dbw->getDBname() . '.'.$wgDBprefix.'si_title_idx' ) . ")" ); |
252 | 260 | } |
253 | 261 | |
254 | 262 | /** |
Index: branches/REL1_17/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -1083,10 +1083,16 @@ |
1084 | 1084 | } |
1085 | 1085 | |
1086 | 1086 | function selectDB( $db ) { |
1087 | | - if ( $db == null || $db == $this->mUser ) { return true; } |
| 1087 | + $this->mDBname = $db; |
| 1088 | + if ( $db == null || $db == $this->mUser ) { |
| 1089 | + return true; |
| 1090 | + } |
1088 | 1091 | $sql = 'ALTER SESSION SET CURRENT_SCHEMA=' . strtoupper($db); |
1089 | 1092 | $stmt = oci_parse( $this->mConn, $sql ); |
1090 | | - if ( !oci_execute( $stmt ) ) { |
| 1093 | + wfSuppressWarnings(); |
| 1094 | + $success = oci_execute( $stmt ); |
| 1095 | + wfRestoreWarnings(); |
| 1096 | + if ( !$success ) { |
1091 | 1097 | $e = oci_error( $stmt ); |
1092 | 1098 | if ( $e['code'] != '1435' ) { |
1093 | 1099 | $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ ); |