DCOracle2: OCI error

Chris chris.monnet at gmail.com
Tue Feb 21 04:08:49 EST 2006


Hello

I'm using DCOracle2 with Python 2.1 and Oracle 8.1.7 on Solaris and
while it's working most of the time, I have random ORA-01084 invalid
argument in OCI call errors that occur on INSERT.
Out of 18000 queries all using the same DB connection I have like 15
errors of this type. It's always the same SQL queries (2 different
INSERT and some other SELECT), only the parameters change and they're
always valid. When the error occur I can simply retry the statement and
it works, so nothing's wrong with the query and its parameters.
If I launch all the queries again the errors will occur again but never
at the same place, it's really random except for the fact that it only
occurs on INSERT.
There are commits after each INSERT. When I have an ORA-1084 I rollback
and go on with the next queries and they work.

So I'm thinking it may be a bug in DCOracle2.
I've activated the DCOracle traceback and I've noticed that the error
always occurs on the binding of NULL (None) values.
My guess at the moment is that the bindObject function in dco2.c should
return 0x00000000 for bind->valuep when the value is None and indeed
it's what it does most of the time but when the error occurs I can see
in the traceback that 0xffffffff is returned and this make the
following call to OCIBindByPos fail with the above error.
Why would 0xffffffff be returned? Any help on this is appreciated.
I'm especially interested in the inner working of dco2.c OCI calls so I
can investigate more because for now I'm stuck.
I'll try to add disconnect / reconnect every now and then to see if it
helps.

Regards
Chris




More information about the Python-list mailing list