Author: byterock
Date: Sun Mar 23 07:46:13 2008
New Revision: 10983
Modified:
dbd-oracle/trunk/Oracle.pm
dbd-oracle/trunk/oci8.c
Log:
small code and pod typo correction. move the current pos setter out the if
loop as it does not do a server round trip and the value may be useful to some.
Modified: dbd-oracle/trunk/Oracle.pm
==============================================================================
--- dbd-oracle/trunk/Oracle.pm (original)
+++ dbd-oracle/trunk/Oracle.pm Sun Mar 23 07:46:13 2008
@@ -2751,9 +2751,8 @@
this code;
$dbh->{LongReadLen} = 2*1024*1024; #2 meg
- $sth=$dbh->prepare($sql,{ora_pers_lob=>1});
$sql='select p_id,lob_1,lob_2,blob_2 from test_lobs';
- $sth=$dbh->prepare($sql,{ora_pers_lob=>1,ora_check_sql=>0});
+ $sth=$dbh->prepare($sql,{ora_pers_lob=>1});
$sth->execute();
while (my ( $p_id,$log,$log2,$log3,$log4 )=$sth->fetchrow()){
print "p_id=".$p_id."\n";
Modified: dbd-oracle/trunk/oci8.c
==============================================================================
--- dbd-oracle/trunk/oci8.c (original)
+++ dbd-oracle/trunk/oci8.c Sun Mar 23 07:46:13 2008
@@ -2443,8 +2443,7 @@
PerlIO_printf(DBILOGFP," Scrolling Fetch,
postion before fetch=%d, Orientation = %s , Fetchoffset =%d\n",
imp_sth->fetch_position,oci_fetch_options(imp_sth->fetch_orient),imp_sth->fetch_offset);
- OCIStmtFetch_log_stat(imp_sth->stmhp, imp_sth->errhp,1,
imp_sth->fetch_orient,imp_sth->fetch_offset, status);
- OCIAttrGet_stmhp_stat(imp_sth,
&imp_sth->fetch_position, 0, OCI_ATTR_CURRENT_POSITION, status);
+ OCIStmtFetch_log_stat(imp_sth->stmhp,
imp_sth->errhp,1, imp_sth->fetch_orient,imp_sth->fetch_offset, status);
if (DBIS->debug >= 4)
PerlIO_printf(DBILOGFP," Scrolling Fetch,
postion after fetch=%d\n",imp_sth->fetch_position);
@@ -2454,6 +2453,10 @@
}
+ /*this will work without a round trip so might as well open it
up for all statments handles*/
+ /* defualt and OCI_FETCH_NEXT are the same so this avoids
miscaluation on the next value*/
+ OCIAttrGet_stmhp_stat(imp_sth, &imp_sth->fetch_position, 0,
OCI_ATTR_CURRENT_POSITION, status);
+
}
if (status != OCI_SUCCESS) {