r65853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65852‎ | r65853 | r65854 >
Date:14:16, 3 May 2010
Author:freakolowsky
Status:ok
Tags:
Comment:
* reportQueryError must break execution on parse and execute
Modified paths:
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -307,12 +307,14 @@
308308 if ( ( $this->mLastResult = $stmt = oci_parse( $this->mConn, $sql ) ) === false ) {
309309 $e = oci_error( $this->mConn );
310310 $this->reportQueryError( $e['message'], $e['code'], $sql, __FUNCTION__ );
 311+ return false;
311312 }
312313
313314 if ( oci_execute( $stmt, $this->execFlags() ) == false ) {
314315 $e = oci_error( $stmt );
315316 if ( !$this->ignore_DUP_VAL_ON_INDEX || $e['code'] != '1' ) {
316317 $this->reportQueryError( $e['message'], $e['code'], $sql, __FUNCTION__ );
 318+ return false;
317319 }
318320 }
319321
@@ -494,6 +496,7 @@
495497 $val = ( $wgLang != null ) ? $wgLang->checkTitleEncoding( $val ) : $val;
496498 if ( oci_bind_by_name( $stmt, ":$col", $val ) === false ) {
497499 $this->reportQueryError( $this->lastErrno(), $this->lastError(), $sql, __METHOD__ );
 500+ return false;
498501 }
499502 } else {
500503 if ( ( $lob[$col] = oci_new_descriptor( $this->mConn, OCI_D_LOB ) ) === false ) {
@@ -518,6 +521,7 @@
519522
520523 if ( !$this->ignore_DUP_VAL_ON_INDEX || $e['code'] != '1' ) {
521524 $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ );
 525+ return false;
522526 } else {
523527 $this->mAffectedRows = oci_num_rows( $stmt );
524528 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r65854Backport for r65853. Oracle DB fix.freakolowsky14:22, 3 May 2010

Status & tagging log