Date: 07/23/98
- Next message: ssb: "[PHP-DEV] CVS update: php31/ext/oracle"
- Previous message: Bug Database: "[PHP-DEV] Bug #575 Updated: Compilation of Apache 1.3.1 with PHP as a module fails."
- Next in thread: kara: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thursday July 23, 1998 @ 11:54
Author: ssb
Update of /repository/php3/functions
In directory asf:/tmp/cvs-serv1396
Modified Files:
oracle.c
Log Message:
Ora_Fetch_Into(): don't return false if there are NULL columns
Index: php3/functions/oracle.c
diff -c php3/functions/oracle.c:1.74 php3/functions/oracle.c:1.75
*** php3/functions/oracle.c:1.74 Thu Jul 2 11:25:06 1998
--- php3/functions/oracle.c Thu Jul 23 11:54:08 1998
***************
*** 1075,1081 ****
tmp.type = IS_STRING;
tmp.value.str.len = 0;
! if (cursor->columns[i].col_retcode != 0 && cursor->columns[i].col_retcode != 1406) {
/* So error fetching column. The most common is 1405, a NULL */
/* was retreived. 1406 is ASCII or string buffer data was */
/* truncated. The converted data from the database did not fit */
--- 1075,1084 ----
tmp.type = IS_STRING;
tmp.value.str.len = 0;
! if (cursor->columns[i].col_retcode == 1405) {
! continue; /* don't add anything for NULL columns */
! } else if (cursor->columns[i].col_retcode != 0 &&
! cursor->columns[i].col_retcode != 1406) {
/* So error fetching column. The most common is 1405, a NULL */
/* was retreived. 1406 is ASCII or string buffer data was */
/* truncated. The converted data from the database did not fit */
***************
*** 1084,1103 ****
/* return what we did get, in that case */
RETURN_FALSE;
} else {
! switch(cursor->columns[i].dbtype)
! {
case SQLT_LNG:
case SQLT_LBI:
! /* XXX 64k max for LONG and LONG RAW */
! oflng(&cursor->cda, (sword)(i + 1), cursor->columns[i].buf, DB_SIZE, 1,
! &ret_len, 0);
! tmp.value.str.len = ret_len;
! break;
default:
! tmp.value.str.len = min(cursor->columns[i].col_retlen, cursor->columns[i].dsize);
break;
! }
! tmp.value.str.val = estrndup(cursor->columns[i].buf, tmp.value.str.len);
}
_php3_hash_index_update(arr->value.ht, i, (void *) &tmp, sizeof(pval), NULL);
}
--- 1087,1107 ----
/* return what we did get, in that case */
RETURN_FALSE;
} else {
! switch(cursor->columns[i].dbtype) {
case SQLT_LNG:
case SQLT_LBI:
! /* XXX 64k max for LONG and LONG RAW */
! oflng(&cursor->cda, (sword)(i + 1), cursor->columns[i].buf, DB_SIZE, 1,
! &ret_len, 0);
! tmp.value.str.len = ret_len;
! break;
default:
! tmp.value.str.len = min(cursor->columns[i].col_retlen,
! cursor->columns[i].dsize);
break;
! }
! tmp.value.str.val = estrndup(cursor->columns[i].buf,
! tmp.value.str.len);
}
_php3_hash_index_update(arr->value.ht, i, (void *) &tmp, sizeof(pval), NULL);
}
***************
*** 1630,1637 ****
* c-basic-offset: 4
* End:
*/
-
-
-
-
-
--- 1634,1636 ----
- Next message: ssb: "[PHP-DEV] CVS update: php31/ext/oracle"
- Previous message: Bug Database: "[PHP-DEV] Bug #575 Updated: Compilation of Apache 1.3.1 with PHP as a module fails."
- Next in thread: kara: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

