CVS update: php3/functions
| From: | thies | Date: | Sat, 22 May 1999 09:32:59 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-5859@lists.php.net to get a copy of this message | ||
Date: Saturday May 22, 1999 @ 5:32
Author: thies
Update of /repository/php3/functions
In directory php:/tmp/cvs-serv26213/functions
Modified Files:
oci8.c
Log Message:
fix for RAW and LONG RAW
Index: php3/functions/oci8.c
diff -u php3/functions/oci8.c:1.100 php3/functions/oci8.c:1.101
--- php3/functions/oci8.c:1.100 Sat May 22 05:16:40 1999
+++ php3/functions/oci8.c Sat May 22 05:32:59 1999
@@ -33,7 +33,7 @@
#define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */
-/* $Id: oci8.c,v 1.100 1999/05/22 09:16:40 thies Exp $ */
+/* $Id: oci8.c,v 1.101 1999/05/22 09:32:59 thies Exp $ */
/* TODO list:
*
@@ -409,6 +409,7 @@
REGISTER_LONG_CONSTANT("OCI_B_BLOB",SQLT_BLOB, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("OCI_B_ROWID",SQLT_RDD, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("OCI_B_CURSOR",SQLT_RSET, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_BIN",SQLT_BIN, CONST_CS | CONST_PERSISTENT);
/* for OCIFetchInto & OCIResult */
REGISTER_LONG_CONSTANT("OCI_ASSOC",OCI_ASSOC, CONST_CS | CONST_PERSISTENT);
@@ -1235,8 +1236,11 @@
case SQLT_LBI:
case SQLT_BIN:
+ define_type = SQLT_BIN;
+ outcol->storage_size4 = OCI8_MAX_DATA_SIZE;
+ break;
+
case SQLT_LNG:
- define_type = SQLT_STR;
outcol->storage_size4 = OCI8_MAX_DATA_SIZE;
break;
@@ -2425,9 +2429,14 @@
if (ocimaxlen == -1) {
if (var->value.str.len == 0) {
php3_error(E_WARNING, "OCIBindByName bindlength is 0");
+ }
+
+ if (ocitype == SQLT_BIN) {
+ ocimaxlen = var->value.str.len;
+ } else {
+ ocimaxlen = var->value.str.len + 1;
+ /* SQLT_STR needs a trailing 0 - maybe we need to resize the var buffers????? */
}
- ocimaxlen = var->value.str.len + 1;
- /* SQLT_STR needs a trailing 0 - maybe we need to resize the var buffers????? */
}
}
break;
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net