From: River Tarnell Date: Wed, 28 Mar 2007 18:26:28 +0000 (+0000) Subject: el_to should be varchar in oracle X-Git-Tag: 1.31.0-rc.0~53558 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=aaaf91b8998a4827866f05f4cd43234f677056e4;p=lhc%2Fweb%2Fwiklou.git el_to should be varchar in oracle check return from oci_new_descriptor --- diff --git a/includes/DatabaseOracle.php b/includes/DatabaseOracle.php index 7560039353..20aff7fae1 100644 --- a/includes/DatabaseOracle.php +++ b/includes/DatabaseOracle.php @@ -331,7 +331,11 @@ class DatabaseOracle extends Database { } } - $bval = oci_new_descriptor($this->mConn, OCI_D_LOB); + if (($bval = oci_new_descriptor($this->mConn, OCI_D_LOB)) === false) { + $e = oci_error($stmt); + throw new DBUnexpectedError($this, "Cannot create LOB descriptor: " . $e['message']); + } + if (strlen($returning)) oci_bind_by_name($stmt, ":bval", $bval, -1, SQLT_BLOB); diff --git a/maintenance/ora/tables.sql b/maintenance/ora/tables.sql index f8ffc55dc1..7273436b19 100644 --- a/maintenance/ora/tables.sql +++ b/maintenance/ora/tables.sql @@ -163,7 +163,7 @@ CREATE INDEX cl_sortkey ON categorylinks (cl_to, cl_sortkey); CREATE TABLE externallinks ( el_from INTEGER NOT NULL REFERENCES page(page_id) ON DELETE CASCADE, - el_to CLOB NOT NULL, + el_to VARCHAR(2048) NOT NULL, el_index CLOB NOT NULL ); -- XXX CREATE INDEX externallinks_from_to ON externallinks (el_from,el_to);