Author: byterock
Date: Fri Feb 20 11:50:01 2009
New Revision: 12524
Modified:
dbd-oracle/trunk/dbdimp.c
dbd-oracle/trunk/dbdimp.h
dbd-oracle/trunk/oci8.c
Log:
Fund a bug where the envp was being removed when it should not be also fixed up a bunch more formating things.
Modified: dbd-oracle/trunk/dbdimp.c
==============================================================================
--- dbd-oracle/trunk/dbdimp.c (original)
+++ dbd-oracle/trunk/dbdimp.c Fri Feb 20 11:50:01 2009
@@ -273,8 +273,8 @@
case 113: /* SQLT_BLOB / long */
case 116: /* SQLT_RSET OCI 8 cursor variable */
case ORA_VARCHAR2_TABLE: /* 201 */
- case ORA_NUMBER_TABLE: /* 202 */
- case ORA_XMLTYPE: /* SQLT_NTY must be carefull here as its value (108) is the same for an embedded object Well realy only XML clobs not embedded objects */
+ case ORA_NUMBER_TABLE: /* 202 */
+ case ORA_XMLTYPE: /* SQLT_NTY must be carefull here as its value (108) is the same for an embedded object Well realy only XML clobs not embedded objects */
return 1;
}
return 0;
@@ -288,15 +288,15 @@
fb_ary_t *
fb_ary_cb_alloc(ub4 piece_size, ub4 max_len, int size)
{
- fb_ary_t *fb_ary;
+ fb_ary_t *fb_ary;
/* these should be reworked to only to one Newz() */
/* and setup the pointers in the head fb_ary struct */
Newz(42, fb_ary, sizeof(fb_ary_t), fb_ary_t);
- Newz(42, fb_ary->abuf, size * piece_size, ub1);
- Newz(42, fb_ary->cb_abuf, size * max_len, ub1);
- Newz(42, fb_ary->aindp, (unsigned)size, sb2);
- Newz(42, fb_ary->arlen, (unsigned)size, ub2);
- Newz(42, fb_ary->arcode, (unsigned)size, ub2);
+ Newz(42, fb_ary->abuf, size * piece_size, ub1);
+ Newz(42, fb_ary->cb_abuf, size * max_len, ub1);
+ Newz(42, fb_ary->aindp,(unsigned)size,sb2);
+ Newz(42, fb_ary->arlen,(unsigned)size,ub2);
+ Newz(42, fb_ary->arcode(unsigned)size,ub2);
fb_ary->bufl = piece_size;
fb_ary->cb_bufl = max_len;
return fb_ary;
@@ -308,16 +308,16 @@
fb_ary_t *
fb_ary_alloc(ub4 bufl, int size)
{
- fb_ary_t *fb_ary;
+ fb_ary_t *fb_ary;
/* these should be reworked to only to one Newz() */
/* and setup the pointers in the head fb_ary struct */
Newz(42, fb_ary, sizeof(fb_ary_t), fb_ary_t);
- Newz(42, fb_ary->abuf, size * bufl, ub1);
- Newz(42, fb_ary->aindp, (unsigned)size, sb2);
- Newz(42, fb_ary->arlen, (unsigned)size, ub2);
- Newz(42, fb_ary->arcode, (unsigned)size, ub2);
+ Newz(42, fb_ary->abuf, size * bufl, ub1);
+ Newz(42, fb_ary->aindp, (unsigned)size,sb2);
+ Newz(42, fb_ary->arlen, (unsigned)size,ub2);
+ Newz(42, fb_ary->arcode,(unsigned)size,ub2);
fb_ary->bufl = bufl;
- /* fb_ary->cb_bufl = bufl;*/
+ /* fb_ary->cb_bufl = bufl;*/
return fb_ary;
}
@@ -396,8 +396,8 @@
}
/* not ACTIVE so connect not skipped */
if (DBIS->debug >= 2 || dbd_verbose >= 3 )
- PerlIO_printf(DBILOGFP,
- "dbd_db_login6 IMPSET but not ACTIVE so connect not skipped\n");
+ PerlIO_printf(DBILOGFP,
+ "dbd_db_login6 IMPSET but not ACTIVE so connect not skipped\n");
}
imp_dbh->envhp = imp_drh->envhp; /* will be NULL on first connect */
@@ -437,7 +437,7 @@
PerlIO_printf(DBILOGFP, " dbd_db_login: use shared Oracle database handles.\n");
} else {
shared_dbh = NULL ;
- }
+ }
}
#endif
@@ -755,7 +755,6 @@
OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
- OCIHandleFree_log_stat(imp_dbh->envhp, OCI_HTYPE_ENV, status);
return 0;
}
OCIAttrSet_log_stat( imp_dbh->svchp, OCI_HTYPE_SVCCTX, imp_dbh->srvhp,
@@ -783,14 +782,12 @@
OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
OCIHandleFree_log_stat(imp_dbh->errhp, OCI_HTYPE_ERROR, status);
OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
- OCIHandleFree_log_stat(imp_dbh->envhp, OCI_HTYPE_ENV, status);
-
return 0;
}
OCIAttrSet_log_stat(imp_dbh->svchp, (ub4) OCI_HTYPE_SVCCTX,
- imp_dbh->authp, (ub4) 0,
- (ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
+ imp_dbh->authp, (ub4) 0,
+ (ub4) OCI_ATTR_SESSION, imp_dbh->errhp, status);
} /* use_proc_connection */
}
@@ -931,7 +928,7 @@
if (is_extproc)
goto dbd_db_destroy_out;
if (!imp_dbh->proc_handles)
- { sword status;
+ { sword status;
OCIHandleFree_log_stat(imp_dbh->authp, OCI_HTYPE_SESSION,status);
OCIHandleFree_log_stat(imp_dbh->srvhp, OCI_HTYPE_SERVER, status);
OCIHandleFree_log_stat(imp_dbh->svchp, OCI_HTYPE_SVCCTX, status);
@@ -980,10 +977,10 @@
warn("ora_ph_type must be 1 (VARCHAR2), 5 (STRING), 96 (CHAR), or 97 (CHARZ)");
else
imp_dbh->ph_type = SvIV(valuesv);
- }
+ }
else if (kl==13 && strEQ(key, "ora_ph_csform")) {
- if (SvIV(valuesv)!=SQLCS_IMPLICIT && SvIV(valuesv)!=SQLCS_NCHAR)
+ if (SvIV(valuesv)!=SQLCS_IMPLICIT && SvIV(valuesv)!=SQLCS_NCHAR)
warn("ora_ph_csform must be 1 (SQLCS_IMPLICIT) or 2 (SQLCS_NCHAR)");
else
imp_dbh->ph_csform = (ub1)SvIV(valuesv);
@@ -1037,7 +1034,7 @@
retsv = newSViv(imp_dbh->ph_csform);
}
else if (kl==22 && strEQ(key, "ora_parse_error_offset")) {
- retsv = newSViv(imp_dbh->parse_error_offset);
+ retsv = newSViv(imp_dbh->parse_error_offset);
}
if (!retsv)
return Nullsv;
@@ -1646,9 +1643,9 @@
if (trace_level >= 3 || dbd_verbose >= 3 )
PerlIO_printf(DBILOGFP, "dbd_rebind_ph_varchar2_table(): bind %s <== %s "
"(%s, %s, csid %d->%d->%d, ftype %d, csform %d->%d, maxlen %lu, maxdata_size %lu)\n",
- phs->name, neatsvpv(phs->sv,0),
+ phs->name, neatsvpv(phs->sv,0),
(phs->is_inout) ? "inout" : "in",
- flag_data_is_utf8 ? "is-utf8" : "not-utf8",
+ flag_data_is_utf8 ? "is-utf8" : "not-utf8",
phs->csid_orig, phs->csid, csid,
phs->ftype, phs->csform, csform,
(unsigned long)phs->maxlen, (unsigned long)phs->maxdata_size);
@@ -2834,8 +2831,8 @@
if( SvROK(newvalue) ){
if( SvTYPE(SvRV(newvalue))==SVt_PVAV ){
- if( (phs->ftype == ORA_VARCHAR2_TABLE) ||
- (phs->ftype == ORA_NUMBER_TABLE) ||
+ if( (phs->ftype == ORA_VARCHAR2_TABLE) ||
+ (phs->ftype == ORA_NUMBER_TABLE) ||
(phs->ftype == 1)) /*ORA_VARCHAR2*/ {
/* Supported */
}else{
@@ -2876,7 +2873,7 @@
char *note = "";
/* XXX doesn't check arcode for error, caller is expected to */
- if (phs->indp == 0) { /* is okay */
+ if (phs->indp == 0) { /* is okay */
if (phs->is_inout && phs->alen == SvLEN(sv)) {
@@ -2916,7 +2913,7 @@
}
if (debug >= 2 || dbd_verbose >= 3 )
PerlIO_printf(DBILOGFP,
- " out %s = %s\t(TRUNCATED from %d to %ld, arcode %d)%s\n",
+ " out %s = %s\t(TRUNCATED from %d to %ld, arcode %d)%s\n",
phs->name, neatsvpv(sv,0), phs->indp, (long)phs->alen, phs->arcode, note);
}
else {
@@ -3161,8 +3158,8 @@
OCIBindDynamic_log(phs->bndhp, imp_sth->errhp,
- (dvoid *)phs, dbd_phs_in,
- (dvoid *)phs, dbd_phs_out, status);
+ (dvoid *)phs, dbd_phs_in,
+ (dvoid *)phs, dbd_phs_out, status);
if (status != OCI_SUCCESS) {
oci_error(sth, imp_sth->errhp, status, "OCIBindDynamic");
return 0;
@@ -3203,7 +3200,7 @@
csid = (phs->csid) ? phs->csid : phs->csid_orig;
/* if data is utf8 but charset isn't then switch to utf8 csid if possible */
if ((utf8 & ARRAY_BIND_UTF8) && !CS_IS_UTF8(csid)) {
- /* if the specified or default csid is not utf8 _compatible_ AND we have
+ /* if the specified or default csid is not utf8 _compatible_ AND we have
* mixed utf8 and native (non-utf8) data, then it's a fatal problem
* utf8 _compatible_ means, can be upgraded to utf8, ie. utf8 or ascii */
if ((utf8 & ARRAY_BIND_NATIVE) && CS_IS_NOT_UTF8_COMPATIBLE(csid)) {
@@ -3314,7 +3311,7 @@
}
/* Check that the `tuples' parameter is an array ref, find the length,
- and store it in the statement handle for the OCI callback. */
+ and store it in the statement handle for the OCI callback. */
if(!SvROK(tuples) || SvTYPE(SvRV(tuples)) != SVt_PVAV) {
croak("ora_st_execute_array(): Not an array reference.");
}
@@ -3523,7 +3520,7 @@
OCIHandleFree_log_stat(row_errhp, OCI_HTYPE_ERROR, status);
/* Do a commit here if autocommit is set, since Oracle
- doesn't do that for us when some rows are in error. */
+ doesn't do that for us when some rows are in error. */
if(autocommit) {
OCITransCommit_log_stat(imp_sth->svchp, imp_sth->errhp,
OCI_DEFAULT, status);
@@ -3940,9 +3937,9 @@
static sql_fbh_t
ora2sql_type(imp_fbh_t* fbh) {
sql_fbh_t sql_fbh;
- sql_fbh.dbtype = fbh->dbtype;
- sql_fbh.prec = fbh->prec;
- sql_fbh.scale = fbh->scale;
+ sql_fbh.dbtype = fbh->dbtype;
+ sql_fbh.prec = fbh->prec;
+ sql_fbh.scale = fbh->scale;
switch(fbh->dbtype) { /* oracle Internal (not external) types */
case SQLT_NUM:
@@ -3971,9 +3968,9 @@
case SQLT_BFLOAT:
case SQLT_IBDOUBLE:
case SQLT_IBFLOAT:
- sql_fbh.dbtype = SQL_DOUBLE;
- sql_fbh.prec = 126;
- break;
+ sql_fbh.dbtype = SQL_DOUBLE;
+ sql_fbh.prec = 126;
+ break;
#endif
case SQLT_CHR: sql_fbh.dbtype = SQL_VARCHAR; break;
case SQLT_LNG: sql_fbh.dbtype = SQL_LONGVARCHAR; break; /* long */
Modified: dbd-oracle/trunk/dbdimp.h
==============================================================================
--- dbd-oracle/trunk/dbdimp.h (original)
+++ dbd-oracle/trunk/dbdimp.h Fri Feb 20 11:50:01 2009
@@ -76,7 +76,7 @@
int clbk_lob; /*use dblink for lobs only for 10g Release 2. or later*/
int piece_lob; /*use piece fetch for lobs*/
ub4 piece_size; /*used in callback to set the size of the piece to get*/
- int has_lobs; /*Statement has bound LOBS */
+ int has_lobs; /*Statement has bound LOBS */
int ret_lobs; /*Statement returns LOBS */
lob_refetch_t *lob_refetch;
int nested_cursor; /* cursors fetched from SELECTs */
@@ -90,12 +90,12 @@
int ora_pad_empty; /* convert ""->" " when binding */
/* Select Column Output Details */
- int done_desc; /* have we described this sth yet ? */
+ int done_desc; /* have we described this sth yet ? */
imp_fbh_t *fbh; /* array of imp_fbh_t structs */
- char *fbh_cbuf; /* memory for all field names */
+ char *fbh_cbuf; /* memory for all field names */
int t_dbsize; /* raw data width of a row */
UV long_readlen; /* local copy to handle oraperl */
- HV *fbh_tdo_hv; /* hash of row #(0 based) and tdo object name from ora_oci_type_names hash */
+ HV *fbh_tdo_hv; /* hash of row #(0 based) and tdo object name from ora_oci_type_names hash */
/* Select Row Cache Details */
sb4 cache_rows;
int in_cache;
@@ -146,10 +146,10 @@
OCITypeCode typecode; /*object's OOCI_ATTR_TYPECODE */
OCITypeCode col_typecode; /*if collection this is its OCI_ATTR_COLLECTION_TYPECODE */
OCITypeCode element_typecode; /*if collection this is its element's OCI_ATTR_TYPECODE*/
- OCIRef *obj_ref; /*if an embeded object this is ref handle to its TDO*/
+ OCIRef *obj_ref; /*if an embeded object this is ref handle to its TDO*/
OCIInd *obj_ind; /*Null indictator for object */
OCIComplexObject *obj_value; /*the actual value from the DB*/
- OCIType *obj_type; /*if an embeded object this is the OCIType returned by a OCIObjectPin*/
+ OCIType *obj_type; /*if an embeded object this is the OCIType returned by a OCIObjectPin*/
fbh_obj_t *fields; /*one object for each field/property*/
int field_count; /*The number of fields Not really needed but nice to have*/
fbh_obj_t *next_subtype; /*There is strored information about subtypes for inteherited objects*/
@@ -163,39 +163,37 @@
int field_num; /* 0..n-1 */
/* Oracle's description of the field */
- OCIParam *parmdp;
- OCIDefine *defnp;
- void *desc_h; /* descriptor if needed (LOBs etc) */
- ub4 desc_t; /* OCI type of descriptor */
- ub4 define_mode; /*the normal case for a define*/
- int (*fetch_func) _((SV *sth, imp_fbh_t *fbh, SV *dest_sv));
- void (*fetch_cleanup) _((SV *sth, imp_fbh_t *fbh));
- ub2 dbtype; /* actual type of field (see ftype) */
- ub2 dbsize;
- ub2 prec; /* XXX docs say ub1 but ub2 is needed */
- sb1 scale;
- ub1 nullok;
- char *name;
- SV *name_sv; /* only set for OCI8 */
+ OCIParam *parmdp;
+ OCIDefine *defnp;
+ void *desc_h; /* descriptor if needed (LOBs etc) */
+ ub4 desc_t; /* OCI type of descriptor */
+ ub4 define_mode; /*the normal case for a define*/
+ int (*fetch_func) _((SV *sth, imp_fbh_t *fbh, SV *dest_sv));
+ void (*fetch_cleanup) _((SV *sth, imp_fbh_t *fbh));
+ ub2 dbtype; /* actual type of field (see ftype) */
+ ub2 dbsize;
+ ub2 prec; /* XXX docs say ub1 but ub2 is needed */
+ sb1 scale;
+ ub1 nullok;
+ char *name;
+ SV *name_sv; /* only set for OCI8 */
/* OCI docs say OCI_ATTR_CHAR_USED is ub4, they're wrong */
- ub1 len_char_used; /* OCI_ATTR_CHAR_USED */
- ub2 len_char_size; /* OCI_ATTR_CHAR_SIZE */
- ub2 csid; /* OCI_ATTR_CHARSET_ID */
- ub1 csform; /* OCI_ATTR_CHARSET_FORM */
-
- ub4 disize; /* max display/buffer size */
- ub4 piece_size; /*used in callback to set the size of the piece to get*/
-
- char *bless; /* for Oracle::OCI style handle data */
- void *special; /* hook for special purposes (LOBs etc) */
- int pers_lob; /*for persistant lobs 10g Release 2. or later*/
- int clbk_lob; /*for persistant lobs 10g Release 2. or later*/
- int piece_lob; /*use piecewise fetch for lobs*/
+ ub1 len_char_used; /* OCI_ATTR_CHAR_USED */
+ ub2 len_char_size; /* OCI_ATTR_CHAR_SIZE */
+ ub2 csid; /* OCI_ATTR_CHARSET_ID */
+ ub1 csform; /* OCI_ATTR_CHARSET_FORM */
+ ub4 disize; /* max display/buffer size */
+ ub4 piece_size; /*used in callback to set the size of the piece to get*/
+ char *bless; /* for Oracle::OCI style handle data */
+ void *special; /* hook for special purposes (LOBs etc) */
+ int pers_lob; /*for persistant lobs 10g Release 2. or later*/
+ int clbk_lob; /*for persistant lobs 10g Release 2. or later*/
+ int piece_lob; /*use piecewise fetch for lobs*/
/* Our storage space for the field data as it's fetched */
- sword ftype; /* external datatype we wish to get */
- fb_ary_t *fb_ary ; /* field buffer array */
+ sword ftype; /* external datatype we wish to get */
+ fb_ary_t *fb_ary ; /* field buffer array */
/* if this is an embedded object we use this */
- fbh_obj_t *obj;
+ fbh_obj_t *obj;
};
@@ -206,8 +204,8 @@
typedef struct phs_st phs_t; /* scalar placeholder */
-struct phs_st { /* scalar placeholder EXPERIMENTAL */
- imp_sth_t *imp_sth; /* 'parent' statement */
+struct phs_st { /* scalar placeholder EXPERIMENTAL */
+ imp_sth_t *imp_sth; /* 'parent' statement */
sword ftype; /* external OCI field type */
SV *sv; /* the scalar holding the value */
@@ -218,7 +216,7 @@
ub4 maxdata_size; /* set OCI_ATTR_MAXDATA_SIZE if >0 */
bool is_inout;
- IV maxlen; /* max possible len (=allocated buffer) */
+ IV maxlen; /* max possible len (=allocated buffer) */
/* Note: for array bind = buffer for each entry */
OCIBind *bndhp;
void *desc_h; /* descriptor if needed (LOBs etc) */
Modified: dbd-oracle/trunk/oci8.c
==============================================================================
--- dbd-oracle/trunk/oci8.c (original)
+++ dbd-oracle/trunk/oci8.c Fri Feb 20 11:50:01 2009
@@ -136,7 +136,7 @@
case OCI_TYPECODE_SIGNED16 : return "SHORT";
case OCI_TYPECODE_SIGNED32 : return "LONG";
case OCI_TYPECODE_DECIMAL : return "DECIMAL";
- case OCI_TYPECODE_FLOAT : return "FLOAT";
+ case OCI_TYPECODE_FLOAT : return "FLOAT";
case OCI_TYPECODE_NUMBER : return "NUMBER";
case OCI_TYPECODE_SMALLINT: return "SMALLINT";
case OCI_TYPECODE_OBJECT: return "OBJECT";
@@ -252,15 +252,15 @@
/*------------------------OCIConnectionpoolCreate Modes----------------------*/
case OCI_CPOOL_REINITIALIZE: return "CPOOL_REINITIALIZE";
/*--------------------------------- OCILogon2 Modes -------------------------*/
-/*case OCI_LOGON2_SPOOL: return "LOGON2_SPOOL"; Use session pool */
+/*case OCI_LOGON2_SPOOL: return "LOGON2_SPOOL"; Use session pool */
case OCI_LOGON2_CPOOL: return "LOGON2_CPOOL"; /* Use connection pool */
-/*case OCI_LOGON2_STMTCACHE: return "LOGON2_STMTCACHE"; Use Stmt Caching */
+/*case OCI_LOGON2_STMTCACHE: return "LOGON2_STMTCACHE"; Use Stmt Caching */
case OCI_LOGON2_PROXY: return "LOGON2_PROXY"; /* Proxy authentiaction */
/*------------------------- OCISessionPoolCreate Modes ----------------------*/
/*case OCI_SPC_REINITIALIZE: return "SPC_REINITIALIZE"; Reinitialize the session pool */
/*case OCI_SPC_HOMOGENEOUS: return "SPC_HOMOGENEOUS"; ""; Session pool is homogeneneous */
/*case OCI_SPC_STMTCACHE: return "SPC_STMTCACHE"; Session pool has stmt cache */
-/*case OCI_SPC_NO_RLB: return "SPC_NO_RLB "; Do not enable Runtime load balancing. */
+/*case OCI_SPC_NO_RLB: return "SPC_NO_RLB "; Do not enable Runtime load balancing. */
/*--------------------------- OCISessionGet Modes ---------------------------*/
/*case OCI_SESSGET_SPOOL: return "SESSGET_SPOOL"; SessionGet called in SPOOL mode */
/*case OCI_SESSGET_CPOOL: return "SESSGET_CPOOL"; SessionGet called in CPOOL mode */
@@ -629,9 +629,9 @@
D_imp_dbh_from_sth ;
D_imp_drh_from_dbh ;
- if (SvOK(imp_drh->ora_cache_o)) cache_mem_iv = -SvIV(imp_drh -> ora_cache_o);
- else if (SvOK(imp_drh->ora_cache)) cache_mem_iv = -SvIV(imp_drh -> ora_cache);
- else cache_mem_iv = -imp_dbh->RowCacheSize;
+ if(SvOK(imp_drh->ora_cache_o)) cache_mem_iv = -SvIV(imp_drh -> ora_cache_o);
+ else if (SvOK(imp_drh->ora_cache)) cache_mem_iv = -SvIV(imp_drh -> ora_cache);
+ else cache_mem_iv = -imp_dbh->RowCacheSize;
cache_mem = (cache_mem_iv <= 0) ? 10 * 1460 : cache_mem_iv;
OCIAttrSet_log_stat(imp_sth->stmhp, OCI_HTYPE_STMT,
&cache_mem, sizeof(cache_mem), OCI_ATTR_PREFETCH_MEMORY,
@@ -678,13 +678,13 @@
phs->indp = -1;
}
}
- else
+ else
if (phs->desc_h) {
*bufpp = phs->desc_h;
phs->alen = 0;
phs->indp = 0;
}
- else
+ else
if (SvOK(phs->sv)) {
*bufpp = SvPV(phs->sv, phs_len);
phs->alen = (phs->alen_incnull) ? phs_len+1 : phs_len;;
@@ -1664,7 +1664,7 @@
char s_tz_hour[3]="000";
char s_tz_min[3]="000";
sb1 tz_hour;
- sb1 tz_minute;
+ sb1 tz_minute;
status = OCIDateTimeGetTimeZoneOffset (fbh->imp_sth->envhp,
fbh->imp_sth->errhp,
*(OCIDateTime**)attr_value,
@@ -1788,7 +1788,7 @@
OCIInd attr_null_status;
OCIInd *element_null;
OCIType *attr_tdo;
- OCIIter *itr;
+ OCIIter *itr;
fbh_obj_t *fld;
OCIInd *obj_ind;
fbh_obj_t *obj = base_obj;
@@ -1803,8 +1803,8 @@
case OCI_TYPECODE_OPAQUE: /*doesn't do anything though*/
if (ora_objects){
- OCIRef *type_ref=0;
- sword status;
+ OCIRef *type_ref=0;
+ sword status;
OCIType *tdo;
status = OCIObjectNew(fbh->imp_sth->envhp, fbh->imp_sth->errhp, fbh->imp_sth->svchp,
@@ -1992,7 +1992,7 @@
get_attr_val(sth,list, fbh, obj->type_name, obj->typecode, value);
}
else
- return 1;
+ return 1;
break;
}
return 1;
@@ -2011,15 +2011,15 @@
}
if (fbh->obj->obj_ind && fbh->obj->obj_ind[0] == OCI_IND_NULL) {
- sv_set_undef(dest_sv);
- return 1;
+ sv_set_undef(dest_sv);
+ return 1;
}
fbh->obj->value=newAV();
/*will return referance to an array of scalars*/
- if (!get_object(sth,fbh->obj->value,fbh,fbh->obj,fbh->obj->obj_value)){
- return 0;
+ if (!get_object(sth,fbh->obj->value,fbh,fbh->obj,fbh->obj->obj_value)){
+ return 0;
} else {
sv_setsv(dest_sv, sv_2mortal(new_ora_object(fbh->obj->value, fbh->obj->typecode)));
return 1;
@@ -2081,7 +2081,7 @@
sword status = OCI_NEED_DATA;
if (DBIS->debug >= 4 || dbd_verbose >= 4 ) {
- PerlIO_printf(DBILOGFP, "in fetch_get_piece \n");
+ PerlIO_printf(DBILOGFP, "in fetch_get_piece \n");
}
while (status == OCI_NEED_DATA){
@@ -2131,7 +2131,7 @@
actual_bufl=actual_bufl+buflen;
}else {
- status=OCI_LAST_PIECE;
+ status=OCI_LAST_PIECE;
}
}
@@ -2146,7 +2146,7 @@
}
sv_setpvn(dest_sv, (char*)fb_ary->cb_abuf,(STRLEN)actual_bufl);
- if (fbh->ftype != SQLT_BIN){
+ if (fbh->ftype != SQLT_BIN){
if (CSFORM_IMPLIES_UTF8(fbh->csform) ){ /* do the UTF 8 magic*/
SvUTF8_on(dest_sv);
@@ -2160,8 +2160,8 @@
int
empty_oci_object(fbh_obj_t *obj){
dTHX;
- int pos = 0;
- fbh_obj_t *fld=NULL;
+ int pos =0;
+ fbh_obj_t *fld=NULL;
@@ -2523,8 +2523,8 @@
if (fld->typecode == OCI_TYPECODE_OBJECT || fld->typecode == OCI_TYPECODE_VARRAY || fld->typecode == OCI_TYPECODE_TABLE || fld->typecode == OCI_TYPECODE_NAMEDCOLLECTION){
/*this is some sort of object or collection so lets drill down some more*/
- Newz(1, fld->fields, 1, fbh_obj_t);
- fld->field_count=1;/*not really needed but used internally*/
+ Newz(1, fld->fields, 1, fbh_obj_t);
+ fld->field_count=1;/*not really needed but used internally*/
status=describe_obj(sth,imp_sth,parmdf,fld->fields,level+1);
}
}
@@ -2886,11 +2886,11 @@
fbh->pers_lob = 1;
fbh->disize = fbh->disize+long_readlen; /*user set max value for the fetch*/
if (fbh->dbtype == ORA_CLOB){
- fbh->ftype = SQLT_CHR;
- }
- else {
- fbh->ftype = SQLT_LVB; /*Binary form seems this is the only value where we cna get the length correctly*/
- }
+ fbh->ftype = SQLT_CHR;
+ }
+ else {
+ fbh->ftype = SQLT_LVB; /*Binary form seems this is the only value where we cna get the length correctly*/
+ }
}
else if (imp_sth->clbk_lob){ /*get by peice with callback a slow*/
fbh->clbk_lob = 1;
@@ -3160,7 +3160,7 @@
if (imp_sth->rs_array_on) { /* if array fetch on, fetch only if not in cache */
imp_sth->rs_array_idx++;
if (imp_sth->rs_array_num_rows<=imp_sth->rs_array_idx && (imp_sth->rs_array_status==OCI_SUCCESS || imp_sth->rs_array_status==OCI_SUCCESS_WITH_INFO)) {
- OCIStmtFetch_log_stat(imp_sth->stmhp,imp_sth->errhp,imp_sth->rs_array_size,(ub2)OCI_FETCH_NEXT,OCI_DEFAULT,status);
+ OCIStmtFetch_log_stat(imp_sth->stmhp,imp_sth->errhp,imp_sth->rs_array_size,(ub2)OCI_FETCH_NEXT,OCI_DEFAULT,status);
imp_sth->rs_array_status=status;
if (oci_warn && (imp_sth->rs_array_status == OCI_SUCCESS_WITH_INFO)) {
oci_error(sth, imp_sth->errhp, status, "OCIStmtFetch");
@@ -3248,8 +3248,8 @@
if (!fbh->fetch_func(sth, fbh, sv)){
++err; /* fetch_func already called oci_error */
}
- }
- else {
+ }
+ else {
int datalen = fb_ary->arlen[imp_sth->rs_array_idx];
char *p = (char*)row_data;
if (fbh->ftype == SQLT_LVB){
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.