Where is DiscardRollbackState()?

Where is DiscardRollbackState()?

am 17.11.2008 19:57:09 von Zoltan Boszormenyi

Hi,

in psqlODBC's odbcapi.c, there's:

#if (ODBCVER < 0x0300)
RETCODE SQL_API
SQLGetStmtOption(HSTMT StatementHandle,
SQLUSMALLINT Option, PTR Value)
{
CSTR func =3D "SQLGetStmtOption";
RETCODE ret;
StatementClass *stmt =3D (StatementClass *) StatementHandle;

mylog("[%s]", func);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret =3D PGAPI_GetStmtOption(StatementHandle, Option, Value, NULL,=
64);
ret =3D DiscardRollbackState(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
#endif /* ODBCVER */

If I compile the driver --with-odbcver=3D0x0250,
DiscardRollbackState() shows up at runtime linking
as an unknown symbol.

DiscardRollbackState() is not defined anywhere,
only referenced in the above function. It's clearly a bug to me.

Best regards,
Zolt=E1n Böszörm=E9nyi

--=20
----------------------------------
Zolt=E1n Böszörm=E9nyi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/


--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Where is DiscardRollbackState()?

am 22.11.2008 02:03:56 von Hiroshi Inoue

Hi Zoltan,
Sorry for the delay.

Zoltan Boszormenyi wrote:
> Hi,
>
> in psqlODBC's odbcapi.c, there's:
>
> #if (ODBCVER < 0x0300)
> RETCODE SQL_API
> SQLGetStmtOption(HSTMT StatementHandle,
> SQLUSMALLINT Option, PTR Value)
> {
> CSTR func = "SQLGetStmtOption";
> RETCODE ret;
> StatementClass *stmt = (StatementClass *) StatementHandle;
>
> mylog("[%s]", func);
> ENTER_STMT_CS(stmt);
> SC_clear_error(stmt);
> StartRollbackState(stmt);
> ret = PGAPI_GetStmtOption(StatementHandle, Option, Value, NULL, 64);
> ret = DiscardRollbackState(stmt, ret, FALSE);
> LEAVE_STMT_CS(stmt);
> return ret;
> }
> #endif /* ODBCVER */
>
> If I compile the driver --with-odbcver=0x0250,
> DiscardRollbackState() shows up at runtime linking
> as an unknown symbol.
>
> DiscardRollbackState() is not defined anywhere,
> only referenced in the above function. It's clearly a bug to me.

You are right.
It should be replaced by DiscardStatementSvp.
I would fix the bug soon.

regards,
Hiroshi Inoue

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc