tony2001                Wed Apr 12 19:21:35 2006 UTC

  Added files:                 (Branch: PHP_5_1)
    /php-src/ext/oci8/tests     bind_long.phpt bind_long_raw.phpt 
                                bind_raw.phpt test.gif 

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/oci8   oci8.c oci8_statement.c 
  Log:
  fix #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW fields)
  add tests
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.509&r2=1.2027.2.510&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.509 php-src/NEWS:1.2027.2.510
--- php-src/NEWS:1.2027.2.509   Wed Apr 12 15:13:57 2006
+++ php-src/NEWS        Wed Apr 12 19:21:34 2006
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Apr 2006, PHP 5.1.3
+- FIxed bug #37059 (oci_bind_by_name() doesn't support RAW and LONG RAW 
+  fields). (Tony)
 - Fixed bug #37057 (xmlrpc_decode() may produce arrays with numeric strings, 
   which are unaccessible). (Tony)
 - Fixed bug #37055 (incorrect reference counting for persistent OCI8 
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.15&r2=1.269.2.16&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.15 php-src/ext/oci8/oci8.c:1.269.2.16
--- php-src/ext/oci8/oci8.c:1.269.2.15  Wed Apr 12 18:01:35 2006
+++ php-src/ext/oci8/oci8.c     Wed Apr 12 19:21:35 2006
@@ -26,7 +26,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8.c,v 1.269.2.15 2006/04/12 18:01:35 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.269.2.16 2006/04/12 19:21:35 tony2001 Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -541,6 +541,8 @@
        REGISTER_LONG_CONSTANT("SQLT_FLT",SQLT_FLT, CONST_CS | 
CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("SQLT_UIN",SQLT_UIN, CONST_CS | 
CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("SQLT_LNG",SQLT_LNG, CONST_CS | 
CONST_PERSISTENT);
+       REGISTER_LONG_CONSTANT("SQLT_LBI",SQLT_LBI, CONST_CS | 
CONST_PERSISTENT);
+       REGISTER_LONG_CONSTANT("SQLT_BIN",SQLT_BIN, CONST_CS | 
CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("SQLT_ODT",SQLT_ODT, CONST_CS | 
CONST_PERSISTENT);
 #if defined(HAVE_OCI_INSTANT_CLIENT) || (defined(OCI_MAJOR_VERSION) && 
OCI_MAJOR_VERSION > 10)
        REGISTER_LONG_CONSTANT("SQLT_BDOUBLE",SQLT_BDOUBLE, CONST_CS | 
CONST_PERSISTENT);
@@ -645,7 +647,7 @@
 
        php_info_print_table_start();
        php_info_print_table_row(2, "OCI8 Support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.15 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16 $");
 
        sprintf(buf, "%ld", OCI_G(num_persistent));
        php_info_print_table_row(2, "Active Persistent Connections", buf);
http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.7.2.13&r2=1.7.2.14&diff_format=u
Index: php-src/ext/oci8/oci8_statement.c
diff -u php-src/ext/oci8/oci8_statement.c:1.7.2.13 
php-src/ext/oci8/oci8_statement.c:1.7.2.14
--- php-src/ext/oci8/oci8_statement.c:1.7.2.13  Sat Mar 18 22:06:31 2006
+++ php-src/ext/oci8/oci8_statement.c   Wed Apr 12 19:21:35 2006
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8_statement.c,v 1.7.2.13 2006/03/18 22:06:31 tony2001 Exp $ */
+/* $Id: oci8_statement.c,v 1.7.2.14 2006/04/12 19:21:35 tony2001 Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -493,6 +493,9 @@
                                case SQLT_BIN:
                                default:
                                        define_type = SQLT_CHR;
+                                       if (outcol->data_type == SQLT_BIN) {
+                                               define_type = SQLT_BIN;
+                                       }
                                        if ((outcol->data_type == SQLT_DAT) || 
(outcol->data_type == SQLT_NUM)
 #ifdef SQLT_TIMESTAMP
                                                || (outcol->data_type == 
SQLT_TIMESTAMP)
@@ -813,6 +816,9 @@
                        mode = OCI_DEFAULT;
                        break;
                        
+               case SQLT_LBI:
+               case SQLT_BIN:
+               case SQLT_LNG:
                case SQLT_CHR:
                        /* this is the default case when type was not specified 
*/
                        convert_to_string(var);

http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/bind_long.phpt?view=markup&rev=1.1
Index: php-src/ext/oci8/tests/bind_long.phpt
+++ php-src/ext/oci8/tests/bind_long.phpt

http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/bind_long_raw.phpt?view=markup&rev=1.1
Index: php-src/ext/oci8/tests/bind_long_raw.phpt
+++ php-src/ext/oci8/tests/bind_long_raw.phpt

http://cvs.php.net/viewcvs.cgi/php-src/ext/oci8/tests/bind_raw.phpt?view=markup&rev=1.1
Index: php-src/ext/oci8/tests/bind_raw.phpt
+++ php-src/ext/oci8/tests/bind_raw.phpt

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

Reply via email to