Hello,

I am at my wits' end trying to debug a problem with LongReadLen.  My
environment is HP-UX 11.11 using a 32-bit Perl.  My database is
Oracle 8.1.7.4.0.  The code looks like:

$dbh = DBI->connect(@connect);
$dbh->{LongReadLen} = 33_554_432;      # 2^25 -- too high
$dbh->prepare($sql);                   # a SELECT statement 

This works fine for LongReadLen <= 33,554,338 bytes (2^25 - 94).  
However, once LongReadLen exceeds this number, as it does above,
I receive the error

ORA-01062: unable to allocate memory for define buffer 
   (DBD ERROR: OCIDefineByPos)

I tried multiple versions of Perl, the Oracle client and modules:

|  Perl |  DBI | DBD::Oracle | Oracle | Status |
|-------+------+-------------+--------+--------|
| 5.5.3 | 1.12 |        1.02 |      7 | OK     |
| 5.5.3 | 1.30 |        1.14 |  8.1.7 | FAIL   |
| 5.6.1 | 1.48 |        1.16 |  9.2.0 | FAIL   |
| 5.8.8 | 1.53 |        1.19 | 10.2.0 | FAIL   |

As you can see only the ancient version of Perl and Oracle works.
In this version I was able to raise LongReadLen to at least 128MB
and I'm sure much higher.  However, I am no longer able to compile
such an ancient version on this machine, nor may I use the existing
DBD::Oracle.

Rewriting the code is not an option; I am upgrading the environment (which
triggered the issue) and I cannot change the code.  The most I could do is
add a small tweak.  However, I did reproduce this issue in a small test
program and can modify that at will.

Why is there a 32MB limit on LongReadLen on this platform?
Any assistance is greatly appreciated--I will have to back out
unless I can solve this issue.

Jim

-- 
[EMAIL PROTECTED] / 0x43340710 / 517B C658 D2CB 260D 3E1F  5ED1 6DB3 FBB9 4334 
0710

Reply via email to