Обсуждение: psqlodbc - psqlodbc: 1) QR_get_fields() gets called when SC_fetch() is

Поиск
Список
Период
Сортировка

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

От
dpage@pgfoundry.org (User Dpage)
Дата:
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)