Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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)

pgsql-committers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group