[svn:dbd-oracle] r14830 - dbd-oracle/branches/by_by_auto_lob
[email protected] Thu, 7 Apr 2011 11:46:08 -0700 (PDT)
| Newsgroups | perl.dbd.oracle.changes |
|---|---|
| Message-ID | <[email protected]> |
Author: byterock
Date: Thu Apr 7 11:46:06 2011
New Revision: 14830
Modified:
dbd-oracle/branches/by_by_auto_lob/dbdimp.c
Log:
Wow this really works. Not finished yet as I still have to Rip out the old code. Should work in all present oracle versions back to 9i something
Modified: dbd-oracle/branches/by_by_auto_lob/dbdimp.c
==============================================================================
--- dbd-oracle/branches/by_by_auto_lob/dbdimp.c (original)
+++ dbd-oracle/branches/by_by_auto_lob/dbdimp.c Thu Apr 7 11:46:06 2011
@@ -2820,7 +2820,7 @@
ub1 csform;
ub2 csid;
- if (trace_level >= 5 || dbd_verbose >= 5 )
+ if (trace_level >= 5 || dbd_verbose <= 5 )
PerlIO_printf(DBILOGFP, "dbd_rebind_ph() (1): rebinding %s as %s (%s, ftype %d (%s), csid %d, csform %d(%s), inout %d)\n",
phs->name, (SvPOK(phs->sv) ? neatsvpv(phs->sv,10) : "NULL"),(SvUTF8(phs->sv) ? "is-utf8" : "not-utf8"),
phs->ftype,sql_typecode_name(phs->ftype),phs->csid, phs->csform,oci_csform_name(phs->csform), phs->is_inout);
@@ -2832,9 +2832,15 @@
case ORA_NUMBER_TABLE:
done = dbd_rebind_ph_number_table(sth, imp_sth, phs);
break;
- case SQLT_CLOB:
+
+ /*
+ done =1;
+ break;*/
case SQLT_BLOB:
- done = dbd_rebind_ph_lob(sth, imp_sth, phs);
+ phs->ftype=SQLT_BIN;
+ done = dbd_rebind_ph_char(imp_sth, phs);
+
+ /* done = dbd_rebind_ph_lob(sth, imp_sth, phs);*/
break;
case SQLT_RSET:
done = dbd_rebind_ph_rset(sth, imp_sth, phs);
@@ -2842,18 +2848,21 @@
case ORA_XMLTYPE:
done = dbd_rebind_ph_xml(sth, imp_sth, phs);
break;
+ case SQLT_CLOB:
+ phs->ftype=ORA_VARCHAR2;
default:
done = dbd_rebind_ph_char(imp_sth, phs);
}
+PerlIO_printf(DBILOGFP, " done=%d \n",done);
if (done == 2) { /* the dbd_rebind_* did the OCI bind call itself successfully */
- if (trace_level >= 3 || dbd_verbose >= 3 )
+ if (trace_level >= 3 || dbd_verbose <= 3 )
PerlIO_printf(DBILOGFP, " rebind %s done with ftype %d (%s)\n",
phs->name, phs->ftype,sql_typecode_name(phs->ftype));
return 1;
}
- if (trace_level >= 3 || dbd_verbose >= 3 )
+ if (trace_level >= 3 || dbd_verbose <= 3 )
PerlIO_printf(DBILOGFP, " bind %s as ftype %d (%s)\n",
phs->name, phs->ftype,sql_typecode_name(phs->ftype));
@@ -3376,11 +3385,11 @@
return -2; /* dbd_describe already called oci_error() */
}
- if (imp_sth->has_lobs && imp_sth->stmt_type != OCI_STMT_SELECT) {
+/* if (imp_sth->has_lobs && imp_sth->stmt_type != OCI_STMT_SELECT) {
if (!post_execute_lobs(sth, imp_sth, row_count))
- return -2; /* post_insert_lobs already called oci_error() */
+ return -2; /* post_insert_lobs already called oci_error()
}
-
+*/
if (outparams) { /* check validity of bound output SV's */
int i = outparams;
while(--i >= 0) {