r20782 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20781‎ | r20782 | r20783 >
Date:18:26, 28 March 2007
Author:river
Status:old
Tags:
Comment:
el_to should be varchar in oracle
check return from oci_new_descriptor
Modified paths:
  • /trunk/phase3/includes/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/maintenance/ora/tables.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/ora/tables.sql
@@ -163,7 +163,7 @@
164164
165165 CREATE TABLE externallinks (
166166 el_from INTEGER NOT NULL REFERENCES page(page_id) ON DELETE CASCADE,
167 - el_to CLOB NOT NULL,
 167+ el_to VARCHAR(2048) NOT NULL,
168168 el_index CLOB NOT NULL
169169 );
170170 -- XXX CREATE INDEX externallinks_from_to ON externallinks (el_from,el_to);
Index: trunk/phase3/includes/DatabaseOracle.php
@@ -331,7 +331,11 @@
332332 }
333333 }
334334
335 - $bval = oci_new_descriptor($this->mConn, OCI_D_LOB);
 335+ if (($bval = oci_new_descriptor($this->mConn, OCI_D_LOB)) === false) {
 336+ $e = oci_error($stmt);
 337+ throw new DBUnexpectedError($this, "Cannot create LOB descriptor: " . $e['message']);
 338+ }
 339+
336340 if (strlen($returning))
337341 oci_bind_by_name($stmt, ":bval", $bval, -1, SQLT_BLOB);
338342