PEAR Bug Search Results
http://pear.php.net/bugs/search.php?cmd=display&package_name%5B0%5D=MDB2_Driver_oci8
Search Resultsen-uspear-webmaster@lists.php.netpear-webmaster@lists.php.nethourly12000年01月01日T12:00+00:00PEAR Bugshttp://pear.php.net/gifs/pearsmall.gif
http://pear.php.net/bugs
MDB2_Driver_oci8: Bug 18719 [Open] ocisetprefetch called after OCIExecute
http://pear.php.net/bugs/18719
MDB2_Driver_oci8 Bug
Reported by thompsa
2011年08月12日T04:09:16+00:00
PHP: 5.3.6 OS: FreeBSD 9.0 Package Version: SVN
Description:
------------
The PHP manual page for oci_set_prefetch() explicitly states it must be called before oci_execute(). In MDB2_Driver_oci8 (and the old pear:db too) the prefetch is set after execute, is this intentional or an oversight?]]>MDB2_Driver_oci8 Bug
Reported by thompsa
2011年08月12日T04:09:16+00:00
PHP: 5.3.6 OS: FreeBSD 9.0 Package Version: SVN
Description:
------------
The PHP manual page for oci_set_prefetch() explicitly states it must be called before oci_execute(). In MDB2_Driver_oci8 (and the old pear:db too) the prefetch is set after execute, is this intentional or an oversight?]]>2011年08月12日T04:09:16+00:00andy at fud dot org dot nzMDB2_Driver_oci8 BugMDB2_Driver_oci8: Feature/Change Request 17354 [Open] Timestamp fields should also have ISO date format
http://pear.php.net/bugs/17354
MDB2_Driver_oci8 Feature/Change Request
Reported by koto
2010年04月28日T19:12:31+00:00
PHP: Irrelevant OS: Package Version: 1.4.1
Description:
------------
When connecting to database in function _doConnect() with default settings, date format for datetime fields is set to ISO:
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
However, timestamp fields retain their default format depending on server-side set locale. To prevent that, one should also issue query:
ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'
This query should be placed in _doConnect() method right next to the previous one. This is a short few-line change that would help everyone dealing with timestamp fields in Oracle (as now they can be safely altered/read/parsed with MDB2_Date )]]>MDB2_Driver_oci8 Feature/Change Request
Reported by koto
2010年04月28日T19:12:31+00:00
PHP: Irrelevant OS: Package Version: 1.4.1
Description:
------------
When connecting to database in function _doConnect() with default settings, date format for datetime fields is set to ISO:
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'
However, timestamp fields retain their default format depending on server-side set locale. To prevent that, one should also issue query:
ALTER SESSION SET NLS_TIMESTAMP_FORMAT='YYYY-MM-DD HH24:MI:SS'
This query should be placed in _doConnect() method right next to the previous one. This is a short few-line change that would help everyone dealing with timestamp fields in Oracle (as now they can be safely altered/read/parsed with MDB2_Date )]]>2010年04月28日T19:12:31+00:00kkotowicz at gmail dot comMDB2_Driver_oci8 Feature/Change RequestMDB2_Driver_oci8: Bug 16246 [Open] bindParam doesnt work with out params under oci8
http://pear.php.net/bugs/16246
MDB2_Driver_oci8 Bug
Reported by hannibal218
2009年05月21日T16:35:47+00:00
PHP: 5.2.9 OS: centos 5.2 64bit Package Version:
Description:
------------
if you try to call a stored procedure under mdb2 oci8, and that procedure has out params. you dont get the out params back.
i think that this actually breaks into two seperate problems.
the first one is that the calls to @OCIBindByName are missing a third variable that gives the size of the expected return value. if , i changed localy :
if (!@OCIBindByName($this->statement, ':'.$parameter, $quoted_values[$i])) {
to :
if(!@OCIBindByName($this->statement, ':'.$parameter, $quoted_values[$i],32))
this gave me the out param values stored inside the $quoted_values array, this leads me to the second bug:
quoted_values is lost inside the function, its data is not added to the object returned by function my solution which is bad, was to add a third reference parameter to the _execute function, to hold that array :
&_execute($result_class = true, $result_wrap_class = false , &$result_params = array())
Test script:
---------------
2 <?php
3 require_once "MDB2.php";
4
5 /*
6 //sayHello syntax
7 CREATE OR REPLACE PROCEDURE
8 sayHello (name IN VARCHAR2, greeting OUT VARCHAR2)
9 AS
10 BEGIN
11 greeting := 'Hello ' || name;
12 END;
13
14 */
15
16
17 $sql = 'begin sayHello(:inName, :inMessage); end;';
18 $name = "dor";
19 $connStr = "oci8://dispatcher:daparISZ@localhost/vcdb.videocells.com";
20 echo " ****************** OCI_INTERFACE **************** <BR>";
21
22 $conn = oci_connect("dispatcher","daparISZ","localhost/vcdb.videocells.com");
23 $stmt = oci_parse($conn,$sql);
24 oci_bind_by_name($stmt,':inName',$name,32);
25 oci_bind_by_name($stmt,':inMessage',$message_OCI,32);
26 oci_execute($stmt);
27 echo "message_OCI = $message_OCI <br>";
28
29 echo " ****************** OCI_INTERFACE_END *********** <BR>";
30 echo " ****************** MDB_INTERFACE_START ********* <BR>";
31 $mdb2 =& MDB2::connect($connStr);
32 if (PEAR::isError($mdb2))
33 {
34 die(__FILE__ ." ". __LINE__ ." : ". $mdb2->getMessage());
35 }
36
37 $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);
38 $mdb2->LoadModule('Extended');
39
40 $statement = $mdb2->prepare($sql);
41 $statement->bindParam("inName",$name);
42 $statement->bindParam("inMessage",$message_MDB);
43 $res = $statement->execute();
44 echo "message_MDB = $message_MDB <br>";
45 $statement->free();
46 echo " ***************** MDB_INTERFACE_END *********** <BR>";
47
48 ?>
49
Expected result:
----------------
****************** OCI_INTERFACE ****************
message_OCI = Hello dor
****************** OCI_INTERFACE_END ***********
****************** MDB_INTERFACE_START *********
message_MDB = Hello dor
***************** MDB_INTERFACE_END ***********
Actual result:
--------------
****************** OCI_INTERFACE ****************
message_OCI = Hello dor
****************** OCI_INTERFACE_END ***********
****************** MDB_INTERFACE_START *********
message_MDB =
***************** MDB_INTERFACE_END ***********]]>MDB2_Driver_oci8 Bug
Reported by hannibal218
2009年05月21日T16:35:47+00:00
PHP: 5.2.9 OS: centos 5.2 64bit Package Version:
Description:
------------
if you try to call a stored procedure under mdb2 oci8, and that procedure has out params. you dont get the out params back.
i think that this actually breaks into two seperate problems.
the first one is that the calls to @OCIBindByName are missing a third variable that gives the size of the expected return value. if , i changed localy :
if (!@OCIBindByName($this->statement, ':'.$parameter, $quoted_values[$i])) {
to :
if(!@OCIBindByName($this->statement, ':'.$parameter, $quoted_values[$i],32))
this gave me the out param values stored inside the $quoted_values array, this leads me to the second bug:
quoted_values is lost inside the function, its data is not added to the object returned by function my solution which is bad, was to add a third reference parameter to the _execute function, to hold that array :
&_execute($result_class = true, $result_wrap_class = false , &$result_params = array())
Test script:
---------------
2 <?php
3 require_once "MDB2.php";
4
5 /*
6 //sayHello syntax
7 CREATE OR REPLACE PROCEDURE
8 sayHello (name IN VARCHAR2, greeting OUT VARCHAR2)
9 AS
10 BEGIN
11 greeting := 'Hello ' || name;
12 END;
13
14 */
15
16
17 $sql = 'begin sayHello(:inName, :inMessage); end;';
18 $name = "dor";
19 $connStr = "oci8://dispatcher:daparISZ@localhost/vcdb.videocells.com";
20 echo " ****************** OCI_INTERFACE **************** <BR>";
21
22 $conn = oci_connect("dispatcher","daparISZ","localhost/vcdb.videocells.com");
23 $stmt = oci_parse($conn,$sql);
24 oci_bind_by_name($stmt,':inName',$name,32);
25 oci_bind_by_name($stmt,':inMessage',$message_OCI,32);
26 oci_execute($stmt);
27 echo "message_OCI = $message_OCI <br>";
28
29 echo " ****************** OCI_INTERFACE_END *********** <BR>";
30 echo " ****************** MDB_INTERFACE_START ********* <BR>";
31 $mdb2 =& MDB2::connect($connStr);
32 if (PEAR::isError($mdb2))
33 {
34 die(__FILE__ ." ". __LINE__ ." : ". $mdb2->getMessage());
35 }
36
37 $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);
38 $mdb2->LoadModule('Extended');
39
40 $statement = $mdb2->prepare($sql);
41 $statement->bindParam("inName",$name);
42 $statement->bindParam("inMessage",$message_MDB);
43 $res = $statement->execute();
44 echo "message_MDB = $message_MDB <br>";
45 $statement->free();
46 echo " ***************** MDB_INTERFACE_END *********** <BR>";
47
48 ?>
49
Expected result:
----------------
****************** OCI_INTERFACE ****************
message_OCI = Hello dor
****************** OCI_INTERFACE_END ***********
****************** MDB_INTERFACE_START *********
message_MDB = Hello dor
***************** MDB_INTERFACE_END ***********
Actual result:
--------------
****************** OCI_INTERFACE ****************
message_OCI = Hello dor
****************** OCI_INTERFACE_END ***********
****************** MDB_INTERFACE_START *********
message_MDB =
***************** MDB_INTERFACE_END ***********]]>2010年06月10日T14:57:06+00:00hannibal218 at gmail dot comMDB2_Driver_oci8 BugMDB2_Driver_oci8: Bug 15922 [Open] LOB support only works with named placeholders
http://pear.php.net/bugs/15922
MDB2_Driver_oci8 Bug
Reported by mameier
2009年02月20日T18:26:12+00:00
PHP: 5.2.5 OS: linux Package Version:
Description:
------------
assuming a table
create table lobtest (id number(10), lots_of_chars clob)
I get the error mentioned below.
The reason is, that the expression in the RETURNING clause does not reference the LOB.
To reference the CLOB column, the names parameter also has to have the same name as then db column.
Unfortunately autoPrepare and autoExecute are building queries with ? as placeholders, so they don't work.
Modifying autoPrepare to build queries with named parameters would be easy, but would break compatibility :-(
The cause of the problem is in MDB2_Driver_oci8::prepare(). Here it would be necessary to identify the name of the LOB column and store it in $lobs[].
So I don't have an easy solution.
Test script:
---------------
$data = array('id'=>1,'lots_of_chars'=>'any number of information');
$types = array('integer','clob');
// this way it works
$query = "insert into lobtest (id,lots_of_chars) values (:id, :lots_of_chars)";
$stm =& $db->prepare($query,$types,MDB2_PREPARE_MANIP);
$res = $stm->execute($data);
if (PEAR::isError($res)) { echo $res->getMessage().' '.$res->getUserInfo()."\n"; } else echo "OK\n";
// this way it doesn't
$query = "insert into lobtest (id,lots_of_chars) values (?,?)";
$stm =& $db->prepare($query,$types,MDB2_PREPARE_MANIP);
$res = $stm->execute(array_values($data));
if (PEAR::isError($res)) { echo $res->getMessage().' '.$res->getUserInfo()."\n"; } else echo "OK\n";
Expected result:
----------------
OK
OK
Actual result:
--------------
OK
MDB2 Error: unknown error _execute: [Error message: could not execute statement]
[Last executed query: insert into lobtest (id,lots_of_chars) values (:0,EMPTY_CLOB()) RETURNING 1 INTO :1]
[Native code: 932]
[Native message: ORA-00932: inconsistent datatypes: expected CLOB got NUMBER]]]>MDB2_Driver_oci8 Bug
Reported by mameier
2009年02月20日T18:26:12+00:00
PHP: 5.2.5 OS: linux Package Version:
Description:
------------
assuming a table
create table lobtest (id number(10), lots_of_chars clob)
I get the error mentioned below.
The reason is, that the expression in the RETURNING clause does not reference the LOB.
To reference the CLOB column, the names parameter also has to have the same name as then db column.
Unfortunately autoPrepare and autoExecute are building queries with ? as placeholders, so they don't work.
Modifying autoPrepare to build queries with named parameters would be easy, but would break compatibility :-(
The cause of the problem is in MDB2_Driver_oci8::prepare(). Here it would be necessary to identify the name of the LOB column and store it in $lobs[].
So I don't have an easy solution.
Test script:
---------------
$data = array('id'=>1,'lots_of_chars'=>'any number of information');
$types = array('integer','clob');
// this way it works
$query = "insert into lobtest (id,lots_of_chars) values (:id, :lots_of_chars)";
$stm =& $db->prepare($query,$types,MDB2_PREPARE_MANIP);
$res = $stm->execute($data);
if (PEAR::isError($res)) { echo $res->getMessage().' '.$res->getUserInfo()."\n"; } else echo "OK\n";
// this way it doesn't
$query = "insert into lobtest (id,lots_of_chars) values (?,?)";
$stm =& $db->prepare($query,$types,MDB2_PREPARE_MANIP);
$res = $stm->execute(array_values($data));
if (PEAR::isError($res)) { echo $res->getMessage().' '.$res->getUserInfo()."\n"; } else echo "OK\n";
Expected result:
----------------
OK
OK
Actual result:
--------------
OK
MDB2 Error: unknown error _execute: [Error message: could not execute statement]
[Last executed query: insert into lobtest (id,lots_of_chars) values (:0,EMPTY_CLOB()) RETURNING 1 INTO :1]
[Native code: 932]
[Native message: ORA-00932: inconsistent datatypes: expected CLOB got NUMBER]]]>2009年02月20日T18:26:12+00:00php at edv-beratung-meier dot deMDB2_Driver_oci8 Bug