wez             Sat Sep 24 20:47:00 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/pdo_oci        oci_statement.c 
    /php-src/ext/pdo_oci/tests  bug_33707.phpt 
  Log:
  refs #34630.
  Real lob support for oracle will appear after the PHP 5.1 release.
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo_oci/oci_statement.c?r1=1.16&r2=1.16.2.1&ty=u
Index: php-src/ext/pdo_oci/oci_statement.c
diff -u php-src/ext/pdo_oci/oci_statement.c:1.16 
php-src/ext/pdo_oci/oci_statement.c:1.16.2.1
--- php-src/ext/pdo_oci/oci_statement.c:1.16    Mon Jul 11 22:43:39 2005
+++ php-src/ext/pdo_oci/oci_statement.c Sat Sep 24 20:46:59 2005
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: oci_statement.c,v 1.16 2005/07/12 02:43:39 wez Exp $ */
+/* $Id: oci_statement.c,v 1.16.2.1 2005/09/25 00:46:59 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -242,10 +242,26 @@
                        
                                /* figure out what we're doing */
                                switch (PDO_PARAM_TYPE(param->param_type)) {
-                                       case PDO_PARAM_LOB:
                                        case PDO_PARAM_STMT:
                                                return 0;
 
+                                       case PDO_PARAM_LOB:
+                                               /* fake lobs for now */
+                                               if (Z_TYPE_P(param->parameter) 
== IS_RESOURCE) {
+                                                       php_stream *stm;
+                                                       
php_stream_from_zval_no_verify(stm, &param->parameter);
+                                                       if (stm) {
+                                                               
SEPARATE_ZVAL_IF_NOT_REF(&param->parameter);
+                                                               
Z_TYPE_P(param->parameter) = IS_STRING;
+                                                               
Z_STRLEN_P(param->parameter) = php_stream_copy_to_mem(stm,
+                                                                               
&Z_STRVAL_P(param->parameter), PHP_STREAM_COPY_ALL, 0);
+                                                       } else {
+                                                               
pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource");
+                                                               return 0;
+                                                       }
+                                               }
+                                               /* fall through */
+
                                        case PDO_PARAM_STR:
                                        default:
                                                P->oci_type = SQLT_CHR;
http://cvs.php.net/diff.php/php-src/ext/pdo_oci/tests/bug_33707.phpt?r1=1.1.2.2&r2=1.1.2.3&ty=u
Index: php-src/ext/pdo_oci/tests/bug_33707.phpt
diff -u php-src/ext/pdo_oci/tests/bug_33707.phpt:1.1.2.2 
php-src/ext/pdo_oci/tests/bug_33707.phpt:1.1.2.3
--- php-src/ext/pdo_oci/tests/bug_33707.phpt:1.1.2.2    Mon Sep 19 20:35:21 2005
+++ php-src/ext/pdo_oci/tests/bug_33707.phpt    Sat Sep 24 20:47:00 2005
@@ -25,6 +25,6 @@
   [1]=>
   int(942)
   [2]=>
-  string(113) "OCIStmtExecute: ORA-00942: table or view does not exist
+  string(%d) "OCIStmtExecute: ORA-00942: table or view does not exist
  (%s:%d)"
 }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to