[DB-SIG] DB-API Ingres module ingmod bug.

Richard Béneyt rbeneyt.akis at nerim.fr
Mon Jul 7 12:44:40 EDT 2003


Hi everybody,

I've found the bug in ingmod.ec which made "tuple index out of range" 
pop up later in python programs.

It was in the sqlda_input_bind(...) function: PySequence_GetItem(seq, 
num) fails at the end of seq and raises an exception that we must clear, 
with PyErr_Clear(), before leaving the loop, else it will crop up a 
little bit later (when a function call PyErr_Occurred() or something 
like that). Another way to do it would be to use PySequence_Length(seq) 
to get the seq's size and work with it.

if (!(elem = PySequence_GetItem(sequence, num)))
{
           PyErr_Clear();
           break;
}

I sent the source to Holger Meyer (ingmod's original author) for him to 
review and integrate.

As I've currently no mean (and no time actually) to set up a place where 
the package could be downloaded, I attach it to this mail, in case it 
would be useful to someone.

Regards.

-- 
Richard Béneyt
rbeneyt.akis at nerim.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ingmod.tar.gz
Type: application/gzip
Size: 19190 bytes
Desc: not available
Url : http://mail.python.org/pipermail/db-sig/attachments/20030707/79d489a5/ingmod.tar.bin


More information about the DB-SIG mailing list