psqlodbc - psqlodbc: 1) QR_get_fields() gets called when SC_fetch() is

From: dpage(at)pgfoundry(dot)org (User Dpage)
To: pgsql-committers(at)postgresql(dot)org
Subject: psqlodbc - psqlodbc: 1) QR_get_fields() gets called when SC_fetch() is
Date: 2005-11-04 15:37:55
Message-ID: 20051104153755.C4E62112503A@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Browse pgsql-committers by date

  From Date Subject
Next Message User Madness 2005-11-04 16:10:32 press - pr: Final commit for Turkish translation.
Previous Message User Dpage 2005-11-04 15:17:54 psqlodbc - psqlodbc: It's C, not C++ Dave :-(