CVS update: php3/functions
| From: | ssb | Date: | Sat, 12 Sep 1998 18:15:40 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1001@lists.php.net to get a copy of this message | ||
Date: Saturday September 12, 1998 @ 14:15
Author: ssb
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv19845
Modified Files:
oci8.c php3_oci8.h
Log Message:
Wrapping things up in Hamburg. Output binds are still not working
properly though.
Index: php3/functions/oci8.c
diff -c php3/functions/oci8.c:1.12 php3/functions/oci8.c:1.13
*** php3/functions/oci8.c:1.12 Fri Sep 11 13:33:43 1998
--- php3/functions/oci8.c Sat Sep 12 14:15:40 1998
***************
*** 23,33 ****
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
! | Authors: |
+----------------------------------------------------------------------+
*/
! /* $Id: oci8.c,v 1.12 1998/09/11 17:33:43 ssb Exp $ */
#include "php.h"
#include "internal_functions.h"
--- 23,36 ----
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
! | Authors: Stig Sæther Bakken <ssb@guardian.no> |
! | |
! | Initial work sponsored by Thies Arntzen <thies@digicol.no> of |
! | Digital Collections, http://www.digicol.de/
|
+----------------------------------------------------------------------+
*/
! /* $Id: oci8.c,v 1.13 1998/09/12 18:15:40 ssb Exp $ */
#include "php.h"
#include "internal_functions.h"
***************
*** 127,133 ****
static void oci8_debug(const char *format,...);
static void oci8_close_conn(oci8_connection *connection);
static void oci8_free_stmt(oci8_statement *statement);
- /*static void oci8_close_pconn(oci8_connection *connection);*/
static oci8_connection *oci8_get_conn(int, const char *, HashTable *, HashTable *);
static oci8_statement *oci8_get_stmt(int, const char *, HashTable *);
--- 130,135 ----
***************
*** 250,258 ****
OCI8_GLOBAL(php3_oci8_module).le_stmt =
register_list_destructors(oci8_free_stmt, NULL);
! /* OCI8_GLOBAL(php3_oci8_module).le_pconn =
! register_list_destructors(oci8_close_pconn, NULL);
! */
return SUCCESS;
}
--- 252,266 ----
OCI8_GLOBAL(php3_oci8_module).le_stmt =
register_list_destructors(oci8_free_stmt, NULL);
! if (cfg_get_long("oci8.max_bind_data_size",
! &OCI8_GLOBAL(php3_oci8_module).max_bind_data_size) == FAILURE) {
! OCI8_GLOBAL(php3_oci8_module).max_bind_data_size = OCI8_MAX_DATA_SIZE;
! }
!
! if (cfg_get_long("oci8.debug_mode",
! &OCI8_GLOBAL(php3_oci8_module).debug_mode) == FAILURE) {
! OCI8_GLOBAL(php3_oci8_module).debug_mode = 0;
! }
return SUCCESS;
}
***************
*** 318,324 ****
dvoid *ret;
oci8_debug("mymalloc(%d)\n", size);
rflush(GLOBAL(php3_rqst));
! ret = (dvoid *)OCI8_MALLOC(size);
return ret;
}
--- 326,332 ----
dvoid *ret;
oci8_debug("mymalloc(%d)\n", size);
rflush(GLOBAL(php3_rqst));
! ret = (dvoid *)emalloc(size);
return ret;
}
***************
*** 327,333 ****
dvoid *ret;
oci8_debug("myrealloc(%08x, %d)\n", ptr, size);
rflush(GLOBAL(php3_rqst));
! ret = (dvoid *)OCI8_REALLOC(ptr, size);
return ptr;
}
--- 335,341 ----
dvoid *ret;
oci8_debug("myrealloc(%08x, %d)\n", ptr, size);
rflush(GLOBAL(php3_rqst));
! ret = (dvoid *)erealloc(ptr, size);
return ptr;
}
***************
*** 335,341 ****
{
oci8_debug("myfree(%08x)\n", ptr);
rflush(GLOBAL(php3_rqst));
! OCI8_FREE(ptr);
}
#endif
--- 343,349 ----
{
oci8_debug("myfree(%08x)\n", ptr);
rflush(GLOBAL(php3_rqst));
! efree(ptr);
}
#endif
***************
*** 345,354 ****
oci8_free_column(oci8_out_column *column)
{
if (column->data) {
! OCI8_FREE(column->data);
}
if (column->value) {
! OCI8_FREE(column->value);
}
return 0;
}
--- 353,362 ----
oci8_free_column(oci8_out_column *column)
{
if (column->data) {
! efree(column->data);
}
if (column->value) {
! efree(column->value);
}
return 0;
}
***************
*** 364,380 ****
OCIHandleFree(statement->pStmt, OCI_HTYPE_STMT);
OCIHandleFree(statement->pError, OCI_HTYPE_ERROR);
if (statement->last_query) {
! OCI8_FREE(statement->last_query);
}
if (statement->columns) {
_php3_hash_destroy(statement->columns);
! OCI8_FREE(statement->columns);
}
if (statement->binds) {
_php3_hash_destroy(statement->binds);
! OCI8_FREE(statement->binds);
}
! OCI8_FREE(statement);
}
/* }}} */
--- 372,388 ----
OCIHandleFree(statement->pStmt, OCI_HTYPE_STMT);
OCIHandleFree(statement->pError, OCI_HTYPE_ERROR);
if (statement->last_query) {
! efree(statement->last_query);
}
if (statement->columns) {
_php3_hash_destroy(statement->columns);
! efree(statement->columns);
}
if (statement->binds) {
_php3_hash_destroy(statement->binds);
! efree(statement->binds);
}
! efree(statement);
}
/* }}} */
***************
*** 390,396 ****
OCILogoff(connection->pServiceContext,
connection->pError));
OCI8_GLOBAL(php3_oci8_module).num_links--;
! OCI8_FREE(connection);
}
/* }}} */
--- 398,404 ----
OCILogoff(connection->pServiceContext,
connection->pError));
OCI8_GLOBAL(php3_oci8_module).num_links--;
! efree(connection);
}
/* }}} */
***************
*** 523,529 ****
static pval *
oci8_make_pval(oci8_out_column *column, char *func)
{
! pval *value = OCI8_CALLOC(1,sizeof(pval));
size_t size;
switch (column->indicator) {
--- 531,537 ----
static pval *
oci8_make_pval(oci8_out_column *column, char *func)
{
! pval *value = ecalloc(1,sizeof(pval));
size_t size;
switch (column->indicator) {
***************
*** 543,549 ****
}
value->type = IS_STRING;
value->value.str.len = size;
! value->value.str.val = OCI8_MALLOC(size);
memcpy(value->value.str.val, column->data, size);
column->value = value;
return value;
--- 551,557 ----
}
value->type = IS_STRING;
value->value.str.len = size;
! value->value.str.val = emalloc(size);
memcpy(value->value.str.val, column->data, size);
column->value = value;
return value;
***************
*** 559,565 ****
sword error;
OCI8_TLS_VARS;
! statement = OCI8_CALLOC(1,sizeof(oci8_statement));
OCIHandleAlloc(connection->pEnv, (dvoid **)&statement->pStmt,
OCI_HTYPE_STMT, 0, NULL);
OCIHandleAlloc(connection->pEnv, (dvoid **)&statement->pError,
--- 567,573 ----
sword error;
OCI8_TLS_VARS;
! statement = ecalloc(1,sizeof(oci8_statement));
OCIHandleAlloc(connection->pEnv, (dvoid **)&statement->pStmt,
OCI_HTYPE_STMT, 0, NULL);
OCIHandleAlloc(connection->pEnv, (dvoid **)&statement->pError,
***************
*** 572,578 ****
return 0;
}
! statement->last_query = OCI8_STRDUP(query);
statement->conn = connection;
return php3_list_insert(statement, OCI8_GLOBAL(php3_oci8_module).le_stmt);
}
--- 580,586 ----
return 0;
}
! statement->last_query = estrdup(query);
statement->conn = connection;
return php3_list_insert(statement, OCI8_GLOBAL(php3_oci8_module).le_stmt);
}
***************
*** 588,708 ****
int counter;
sword error, def_error;
ub2 define_type;
OCI8_TLS_VARS;
error = OCIStmtExecute(statement->conn->pServiceContext,
statement->pStmt, statement->pError,
! 0, 0, NULL, NULL, OCI_DEFAULT);
if (error) {
! oci8_error(statement->pError, "OCIExecute", error);
return 0;
}
! statement->columns = OCI8_MALLOC(sizeof(HashTable));
if (!statement->columns ||
_php3_hash_init(statement->columns, 13, NULL,
! (void (*)(void *))oci8_free_column, 0) == FAILURE) {
/* out of memory */
return 0;
}
! OCIHandleAlloc(statement->conn->pEnv, (dvoid **)¶m,
! OCI_DTYPE_PARAM, 0, NULL);
! counter = 1;
! error = OCIParamGet(statement->pStmt, OCI_HTYPE_STMT, statement->pError,
! (dvoid *)¶m, counter);
! oci8_error(statement->pError, "OCIExecute", error);
! while (error == OCI_SUCCESS) {
! outcol = OCI8_CALLOC(1,sizeof(oci8_out_column));
! if (_php3_hash_index_update(statement->columns, counter, outcol,
! sizeof(oci8_out_column), NULL) == FAILURE) {
! OCI8_FREE(outcol);
! OCI8_FREE(statement->columns);
! /* out of memory */
! return 0;
! } else {
! oci8_debug("added info about column %d", counter);
! }
! OCI8_FREE(outcol);
! if (_php3_hash_index_find(statement->columns, counter,
! (void **)&outcol) == FAILURE ||
! outcol == NULL) {
! php3_error(E_WARNING, "%s: inserted column lost?!", func);
! return 0;
! }
! outcol->name = NULL;
! /* get data type */
! /* XXX can get OCI_ATTR_TYPE_NAME instead */
! oci8_error(statement->pError, func,
! OCIAttrGet((dvoid *)param, OCI_DTYPE_PARAM,
! (dvoid *)&outcol->type, (ub4 *)0,
! OCI_ATTR_DATA_TYPE, statement->pError));
! /* get data size */
! oci8_error(statement->pError, func,
! OCIAttrGet((dvoid *)param, OCI_DTYPE_PARAM,
! (dvoid *)&outcol->storage_size, (dvoid *)0,
! OCI_ATTR_DATA_SIZE, statement->pError));
! /* get column name */
! oci8_error(statement->pError, func,
! OCIAttrGet((dvoid *)param, OCI_DTYPE_PARAM,
! (dvoid **)&outcol->name,
! (ub4 *)&outcol->name_len,
! (ub4)OCI_ATTR_NAME, statement->pError));
! /* Remember the size Oracle told us, we have to increase the
! * storage size for some types.
! */
! outcol->size = outcol->storage_size;
!
! /* "Scalar" data types are stored directly in strings,
! * while others, like LOBs and RAW data need to be
! * handled specially.
! */
! switch (outcol->type) {
! case SQLT_BIN: /* RAW */
! case SQLT_LBI: /* LONG RAW */
! case SQLT_BLOB: /* binary LOB */
! case SQLT_CLOB: /* character LOB */
! case SQLT_BFILE: /* binary file LOB */
! case SQLT_RSET: /* ref. cursor */
! outcol->is_opaque = 1;
! define_type = outcol->type;
! break;
! default:
! outcol->is_opaque = 0;
! define_type = SQLT_STR;
! outcol->storage_size++; /* add one for string terminator */
! break;
! }
! outcol->data = (text *)OCI8_MALLOC(outcol->storage_size);
! if (outcol->data == NULL) {
! OCI8_FREE(outcol);
! OCI8_FREE(statement->columns);
! /* out of memory */
! return 0;
! }
! def_error = OCIDefineByPos(statement->pStmt,
! (OCIDefine **)&outcol->pDefine,
! statement->pError, counter,
! (dvoid *)outcol->data,
! outcol->storage_size, define_type,
! (dvoid *)&outcol->indicator, (ub2 *)0,
! (ub2 *)&outcol->retcode, OCI_DEFAULT);
!
! if (def_error) {
! oci8_error(statement->pError, func, def_error);
! OCI8_FREE(outcol->data);
! OCI8_FREE(outcol);
! OCI8_FREE(statement->columns);
! return 0;
}
! statement->ncolumns = counter;
! counter++;
! error = OCIParamGet(statement->pStmt, OCI_HTYPE_STMT,
! statement->pError, (dvoid *)¶m, counter);
! }
return 1;
}
--- 596,732 ----
int counter;
sword error, def_error;
ub2 define_type;
+ ub4 fncode = 0, iters, mode;
OCI8_TLS_VARS;
+ OCIAttrGet((dvoid *)statement, OCI_HTYPE_STMT,
+ (dvoid *)&fncode, (ub4 *)0, OCI_ATTR_SQLFNCODE,
+ statement->pError);
+
+ if (fncode == FT_SELECT) {
+ iters = 0;
+ } else {
+ iters = 1;
+ }
+ mode = OCI_COMMIT_ON_SUCCESS;
+ oci8_debug("oci8_execute: fncode=%d mode=%d", fncode, mode);
error = OCIStmtExecute(statement->conn->pServiceContext,
statement->pStmt, statement->pError,
! iters, 0, NULL, NULL, mode);
if (error) {
! oci8_debug("oci8_execute error 1");
! oci8_error(statement->pError, func, error);
return 0;
}
! statement->columns = emalloc(sizeof(HashTable));
if (!statement->columns ||
_php3_hash_init(statement->columns, 13, NULL,
! (void (*)(void *))efree_column, 0) == FAILURE) {
/* out of memory */
return 0;
}
! if (fncode == FT_SELECT) {
! OCIHandleAlloc(statement->conn->pEnv, (dvoid **)¶m,
! OCI_DTYPE_PARAM, 0, NULL);
! counter = 1;
! error = OCIParamGet(statement->pStmt, OCI_HTYPE_STMT,
! statement->pError, (dvoid *)¶m, counter);
! oci8_error(statement->pError, "oci8_execute2", error);
! while (error == OCI_SUCCESS) {
! outcol = ecalloc(1,sizeof(oci8_out_column));
! if (_php3_hash_index_update(statement->columns, counter, outcol,
! sizeof(oci8_out_column), NULL) == FAILURE) {
! efree(outcol);
! efree(statement->columns);
! /* out of memory */
! return 0;
! } else {
! oci8_debug("added info about column %d", counter);
! }
! efree(outcol);
! if (_php3_hash_index_find(statement->columns, counter,
! (void **)&outcol) == FAILURE ||
! outcol == NULL) {
! php3_error(E_WARNING, "%s: inserted column lost?!", func);
! return 0;
! }
! outcol->name = NULL;
! /* get data type */
! /* XXX can get OCI_ATTR_TYPE_NAME instead */
! oci8_error(statement->pError, "OCIAttrGet(param,type)",
! OCIAttrGet((dvoid *)param, OCI_DTYPE_PARAM,
! (dvoid *)&outcol->type, (ub4 *)0,
! OCI_ATTR_DATA_TYPE, statement->pError));
! /* get data size */
! oci8_error(statement->pError, "OCIAttrGet(param,size)",
! OCIAttrGet((dvoid *)param, OCI_DTYPE_PARAM,
! (dvoid *)&outcol->storage_size, (dvoid *)0,
! OCI_ATTR_DATA_SIZE, statement->pError));
! /* get column name */
! oci8_error(statement->pError, "OCIAttrGet(param,name)",
! OCIAttrGet((dvoid *)param, OCI_DTYPE_PARAM,
! (dvoid **)&outcol->name,
! (ub4 *)&outcol->name_len,
! (ub4)OCI_ATTR_NAME, statement->pError));
! /* Remember the size Oracle told us, we have to increase the
! * storage size for some types.
! */
! outcol->size = outcol->storage_size;
!
! /* "Scalar" data types are stored directly in strings,
! * while others, like LOBs and RAW data need to be
! * handled specially.
! */
! switch (outcol->type) {
! case SQLT_BIN: /* RAW */
! case SQLT_LBI: /* LONG RAW */
! case SQLT_BLOB: /* binary LOB */
! case SQLT_CLOB: /* character LOB */
! case SQLT_BFILE: /* binary file LOB */
! case SQLT_RSET: /* ref. cursor */
! outcol->is_opaque = 1;
! define_type = outcol->type;
! break;
! default:
! outcol->is_opaque = 0;
! define_type = SQLT_STR;
! outcol->storage_size++; /* add one for string terminator */
! break;
! }
! outcol->data = (text *)emalloc(outcol->storage_size);
! if (outcol->data == NULL) {
! efree(outcol);
! efree(statement->columns);
! /* out of memory */
! return 0;
! }
! def_error = OCIDefineByPos(statement->pStmt,
! (OCIDefine **)&outcol->pDefine,
! statement->pError, counter,
! (dvoid *)outcol->data,
! outcol->storage_size, define_type,
! (dvoid *)&outcol->indicator, (ub2 *)0,
! (ub2 *)&outcol->retcode, OCI_DEFAULT);
!
! if (def_error) {
! oci8_debug("oci8_execute error 2");
! oci8_error(statement->pError, func, def_error);
! efree(outcol->data);
! efree(outcol);
! efree(statement->columns);
! return 0;
! }
! statement->ncolumns = counter;
! counter++;
! error = OCIParamGet(statement->pStmt, OCI_HTYPE_STMT,
! statement->pError, (dvoid *)¶m, counter);
}
! }
return 1;
}
***************
*** 749,757 ****
phpbind = (oci8_bind *)ictxp;
oci8_debug("oci8_bind_in_callback: phpbind=%08x", phpbind);
if (phpbind) {
! oci8_debug("oci8_bind_in_callback: phpbind->val=%08x", phpbind->val);
}
! if (!phpbind || !(val = phpbind->val)) {
php3_error(E_WARNING, "!phpbind || !phpbind->val");
return OCI_ERROR;
}
--- 773,781 ----
phpbind = (oci8_bind *)ictxp;
oci8_debug("oci8_bind_in_callback: phpbind=%08x", phpbind);
if (phpbind) {
! oci8_debug("oci8_bind_in_callback: phpbind->val=%08x", phpbind->value);
}
! if (!phpbind || !(val = phpbind->value)) {
php3_error(E_WARNING, "!phpbind || !phpbind->val");
return OCI_ERROR;
}
***************
*** 768,774 ****
phpbind->size = 0;
phpbind->buf = NULL;
} else {
! convert_to_string(val);
phpbind->indicator = 0;
phpbind->size = val->value.str.len + 1;
phpbind->buf = val->value.str.val;
--- 792,798 ----
phpbind->size = 0;
phpbind->buf = NULL;
} else {
! convert_to_string(val); /* XXX FIXME should make a copy instead */
phpbind->indicator = 0;
phpbind->size = val->value.str.len + 1;
phpbind->buf = val->value.str.val;
***************
*** 801,806 ****
--- 825,854 ----
dvoid **indpp, /* indicator value */
ub2 **rcodepp) /* return code */
{
+ oci8_bind *phpbind;
+ pval *val;
+
+ oci8_debug("oci8_bind_out_callback: iter=%d index=%d alen=%d", iter, index,
*(*alenpp));
+
+ phpbind = (oci8_bind *)ctxp;
+ val = phpbind->value;
+ if (val == NULL) {
+ return OCI_ERROR;
+ }
+ if (phpbind->is_opaque) {
+ oci8_debug("OUT binding of opaque types not yet implemented");
+ return OCI_ERROR;
+ } else {
+ /* non-opaque values always get converted to strings */
+ convert_to_string(val);
+ phpbind->buf = (dvoid *)val->value.str.val;
+ phpbind->size = (ub4)val->value.str.len;
+ *alenpp = (dvoid *)&phpbind->buf;
+ *bufpp = (dvoid *)&phpbind->size;
+ *piecep = OCI_ONE_PIECE;
+ *indpp = (dvoid *)&phpbind->indicator;
+ }
+
return OCI_CONTINUE;
}
***************
*** 873,879 ****
RETURN_FALSE;
}
! connection = (oci8_connection *)OCI8_CALLOC(1,sizeof(oci8_connection));
if (connection == NULL) {
RETURN_OUT_OF_MEMORY;
--- 921,927 ----
RETURN_FALSE;
}
! connection = (oci8_connection *)ecalloc(1,sizeof(oci8_connection));
if (connection == NULL) {
RETURN_OUT_OF_MEMORY;
***************
*** 1337,1349 ****
if (statement == NULL) {
RETURN_FALSE;
}
! bind = OCI8_CALLOC(1,sizeof(oci8_bind));
if (!bind) {
/* out of memory */
RETURN_FALSE;
}
if (statement->binds == NULL) {
! statement->binds = OCI8_MALLOC(sizeof(HashTable));
if (statement->binds == NULL ||
_php3_hash_init(statement->binds, 13, NULL, NULL, 0) == FAILURE) {
/* out of memory */
--- 1385,1397 ----
if (statement == NULL) {
RETURN_FALSE;
}
! bind = ecalloc(1,sizeof(oci8_bind));
if (!bind) {
/* out of memory */
RETURN_FALSE;
}
if (statement->binds == NULL) {
! statement->binds = emalloc(sizeof(HashTable));
if (statement->binds == NULL ||
_php3_hash_init(statement->binds, 13, NULL, NULL, 0) == FAILURE) {
/* out of memory */
***************
*** 1353,1369 ****
if (_php3_hash_next_index_insert(statement->binds, bind,
sizeof(oci8_bind),
(void **)&tmp_bind) == SUCCESS) {
! OCI8_FREE(bind);
bind = tmp_bind;
}
! bind->val = var;
error = OCIBindByName(statement->pStmt, /* statement handle */
(OCIBind **)&bind->pBind, /* bind hdl (will alloc) */
statement->pError, /* error handle */
name->value.str.val, /* placeholder name */
name->value.str.len, /* placeholder length */
(dvoid *)0, /* in/out data */
! (sb4)OCI8_MAX_DATA_SIZE, /* max size ever used */
(ub2)SQLT_STR, /* in/out data type */
(dvoid *)0, /* indicator (ignored) */
(ub2 *)0, /* size array (ignored) */
--- 1401,1417 ----
if (_php3_hash_next_index_insert(statement->binds, bind,
sizeof(oci8_bind),
(void **)&tmp_bind) == SUCCESS) {
! efree(bind);
bind = tmp_bind;
}
! bind->value = var;
error = OCIBindByName(statement->pStmt, /* statement handle */
(OCIBind **)&bind->pBind, /* bind hdl (will alloc) */
statement->pError, /* error handle */
name->value.str.val, /* placeholder name */
name->value.str.len, /* placeholder length */
(dvoid *)0, /* in/out data */
! OCI8_GLOBAL(php3_oci8_module).max_bind_data_size,
(ub2)SQLT_STR, /* in/out data type */
(dvoid *)0, /* indicator (ignored) */
(ub2 *)0, /* size array (ignored) */
***************
*** 1379,1391 ****
statement->pError,
(dvoid *)bind,
oci8_bind_in_callback,
- #if 0
(dvoid *)bind,
oci8_bind_out_callback
- #else
- (dvoid *)NULL,
- (OCICallbackOutBind)NULL
- #endif
);
RETVAL_TRUE;
}
--- 1427,1434 ----
Index: php3/functions/php3_oci8.h
diff -c php3/functions/php3_oci8.h:1.9 php3/functions/php3_oci8.h:1.10
*** php3/functions/php3_oci8.h:1.9 Fri Sep 11 13:33:43 1998
--- php3/functions/php3_oci8.h Sat Sep 12 14:15:40 1998
***************
*** 25,30 ****
--- 25,32 ----
+----------------------------------------------------------------------+
| Authors: Stig Sæther Bakken <ssb@guardian.no> |
| |
+ | Initial work sponsored by Thies Arntzen <thies@digicol.no> of |
+ | Digital Collections, http://www.digicol.de/
|
+----------------------------------------------------------------------+
*/
***************
*** 49,54 ****
--- 51,62 ----
# include <oci.h>
+ /* some SQL function codes */
+ #define FT_INSERT 3
+ #define FT_SELECT 4
+ #define FT_UPDATE 5
+ #define FT_DELETE 9
+
# if 0
typedef struct {
OCIEnv *pEnv;
***************
*** 74,84 ****
typedef struct {
OCIBind *pBind;
! pval *val;
ub4 size;
dvoid *buf;
sb2 indicator;
ub2 is_opaque;
} oci8_bind;
typedef struct {
--- 82,93 ----
typedef struct {
OCIBind *pBind;
! pval *value;
ub4 size;
dvoid *buf;
sb2 indicator;
ub2 is_opaque;
+ ub2 rcode;
} oci8_bind;
typedef struct {
***************
*** 108,133 ****
int le_conn;
/* int le_pconn;*/
int le_stmt;
} oci8_module;
extern php3_module_entry oci8_module_entry;
# define oci8_module_ptr &oci8_module_entry
-
- # if 0 /* use system malloc, useful for purify */
- # define OCI8_MALLOC malloc
- # define OCI8_CALLOC calloc
- # define OCI8_REALLOC realloc
- # define OCI8_FREE free
- # define OCI8_STRDUP strdup
- # define OCI8_STRNDUP strndup
- # else /* use PHP's emalloc */
- # define OCI8_MALLOC emalloc
- # define OCI8_CALLOC ecalloc
- # define OCI8_REALLOC erealloc
- # define OCI8_FREE efree
- # define OCI8_STRDUP estrdup
- # define OCI8_STRNDUP estrndup
- # endif
# define OCI8_MAX_NAME_LEN 64
# define OCI8_MAX_DATA_SIZE 2097152 /* two megs */
--- 117,127 ----
int le_conn;
/* int le_pconn;*/
int le_stmt;
+ sb4 max_bind_data_size;
} oci8_module;
extern php3_module_entry oci8_module_entry;
# define oci8_module_ptr &oci8_module_entry
# define OCI8_MAX_NAME_LEN 64
# define OCI8_MAX_DATA_SIZE 2097152 /* two megs */
--
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