CVS update: php3/functions

From: Date: Tue, 06 Apr 1999 12:45:52 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-4956@lists.php.net to get a copy of this message
Date: Tuesday April 6, 1999 @ 8:45 Author: thies Update of /repository/php3/functions In directory asf:/u/temp/cvs-serv11100 Modified Files: oci8.c Log Message: fix for #1280 and #1277 Index: php3/functions/oci8.c diff -c php3/functions/oci8.c:1.72 php3/functions/oci8.c:1.73 *** php3/functions/oci8.c:1.72 Tue Apr 6 08:05:00 1999 --- php3/functions/oci8.c Tue Apr 6 08:45:51 1999 *************** *** 33,39 **** #define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */ ! /* $Id: oci8.c,v 1.72 1999/04/06 12:05:00 thies Exp $ */ /* TODO list: * --- 33,39 ---- #define OCI8_USE_EMALLOC 0 /* set this to 1 if you want to use the php memory manager! */ ! /* $Id: oci8.c,v 1.73 1999/04/06 12:45:51 thies Exp $ */ /* TODO list: * *************** *** 1207,1221 **** if (column == NULL) { /* should not happen... */ continue; } ! if ((column->define) && (! column->is_descr)) { pval = column->define->pval; ! if (column->retcode == 1406) { /*XXX ORA-01406 truncated value */ ! oci8_debug("OCIFetch: truncated column %s indicator = %d", func,column->name,column->indicator); ! pval->value.str.len = column->indicator - 1; /* when value is truncated indicator contains the lenght */ ! } else { ! pval->value.str.len = column->rlen; } pval->value.str.val[ pval->value.str.len ] = 0; --- 1207,1230 ---- if (column == NULL) { /* should not happen... */ continue; } ! if ((column->define) && (! column->is_descr)) { pval = column->define->pval; + + if (! column->define->data) { /* oracle has NOT called our define_callback (column value is NULL) */ + pval->value.str.val = emalloc(column->storage_size4); + column->define->data = pval->value.str.val; + } ! if (column->indicator == -1) { /* NULL */ ! pval->value.str.len = 0; ! } else { ! if (column->retcode == 1406) { /*XXX ORA-01406 truncated value */ ! oci8_debug("OCIFetch: truncated column %s indicator = %d", func,column->name,column->indicator); ! pval->value.str.len = column->indicator - 1; /* when value is truncated indicator contains the lenght */ ! } else { ! pval->value.str.len = column->rlen; ! } } pval->value.str.val[ pval->value.str.len ] = 0; -- 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

« previous php.dev (#4956) next »