CVS update: php3/functions

From: Date: Fri, 04 Jun 1999 10:24:16 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-6534@lists.php.net to get a copy of this message
Date: Friday June 4, 1999 @ 6:24 Author: thies Update of /repository/php3/functions In directory php:/tmp/cvs-serv2218/functions Modified Files: oci8.c Log Message: fixed crash when user does ocifetch* on a cursor that has no more data. Index: php3/functions/oci8.c diff -u php3/functions/oci8.c:1.106 php3/functions/oci8.c:1.107 --- php3/functions/oci8.c:1.106 Thu Jun 3 07:57:00 1999 +++ php3/functions/oci8.c Fri Jun 4 06:24:15 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.106 1999/06/03 11:57:00 thies Exp $ */ +/* $Id: oci8.c,v 1.107 1999/06/04 10:24:15 thies Exp $ */ /* TODO list: * @@ -852,6 +852,10 @@ int i; OCI8_TLS_VARS; + if (statement->columns == 0) { /* we release the columns at the end of a fetch */ + return NULL; + } + if (pval) { if (pval->type == IS_STRING) { for (i = 0; i < statement->ncolumns; i++) { @@ -890,8 +894,11 @@ ub4 loblen; char *buffer; +#if 0 if (column->indicator || column->retcode) if ((column->indicator != -1) && (column->retcode != 1405)) /* "normal" NULL column -> no interest for us! */ +#endif + oci8_debug("oci8_make_pval: %16s,rlen = %4d,storage_size4 = %4d,size2 = %4d,indicator %4d, retcode = %4d", column->name,column->rlen,column->storage_size4,column->size2,column->indicator,column->retcode); @@ -3135,7 +3142,6 @@ #if PHP_API_VERSION < 19990421 element = emalloc(sizeof(pval)); #endif - for (i = 0; i < statement->ncolumns; i++) { column = oci8_get_col(statement, i + 1, 0, "OCIFetchInto");

« previous php.dev (#6534) next »