psqlodbc - psqlodbc: 1) QR_get_fields() gets called when SC_fetch() is - Mailing list pgsql-committers

From dpage@pgfoundry.org (User Dpage)
Subject psqlodbc - psqlodbc: 1) QR_get_fields() gets called when SC_fetch() is
Date
Msg-id 20051104153755.C4E62112503A@pgfoundry.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
1) QR_get_fields() gets called when SC_fetch() is entered. However, the QR
cleanup will free the QResultClass object. And the pointer "coli" is no longer
valid when CI_get_oid() gets called further down.
I have fixed this by calling QR_get_fields() after the first if-statement.

2) This is basically the same "cache" bug: PGAPI_ExtendedFetch() caches the
stored QResultClass object when the function is entered. But after SC_fetch()
was called, the pointer is no longer valid.
I have fixed this by calling SC_get_Curres() again after the call to
SC_fetch().
[Rainer Bauer]

Modified Files:
--------------
    psqlodbc:
        results.c (r1.83 -> r1.84)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/psqlodbc/psqlodbc/results.c.diff?r1=1.83&r2=1.84)
        statement.c (r1.106 -> r1.107)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/psqlodbc/psqlodbc/statement.c.diff?r1=1.106&r2=1.107)

pgsql-committers by date:

Previous
From: dpage@pgfoundry.org (User Dpage)
Date:
Subject: psqlodbc - psqlodbc: It's C, not C++ Dave :-(
Next
From: madness@pgfoundry.org (User Madness)
Date:
Subject: press - pr: Final commit for Turkish translation.