DB2 - Problembeschreibung
Problem IC68198 | Status: Geschlossen |
SQLFREEHANDLE() for environment handle in CLI application returns -1 on DB2 V9.7 FP1 | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
SQLFreeHandle() for environment handle in CLI application returns 0 on DB2 V9.7 GA. However, it returns -1 on DB2 V9.7 FP1. We can reproduce this issue. Here is a part of the application code and its result. $ cat cli01.c ...(snip)... int main(int argc, char *argv[]) { ...(snip)... printf("\n Disconnecting from %s...\n", dbAlias); cliRC = SQLDisconnect(hdbc); DBC_HANDLE_CHECK(hdbc, cliRC); . printf(" Disconnected from %s.\n", dbAlias); . /* free connection handle */ cliRC = SQLFreeHandle(SQL_HANDLE_DBC, hdbc); DBC_HANDLE_CHECK(hdbc, cliRC); . /* free environment handle */ cliRC = SQLFreeHandle(SQL_HANDLE_ENV, henv); printf("cliRC = [%d]\n", cliRC); ENV_HANDLE_CHECK(henv, cliRC); . return rc; } /* main */ This problem occurs only when we build it as 32-bit application on V9.7 FP1. like the following(badcase): xlc -I/home/v97fp1/sqllib/include -c cli01.c xlc -o cli01 cli01.o -L/home/v97fp1/sqllib/lib32 -ldb2 On the other hand, this problem does not occur if we compile it as 64-bit. Application issues SQLFreeHandle twice. The first one for SQL_HANDLE_DBC succeeds with rc 0, but the second one for SQL_HANDLE_ENV gets RC -1 even though cli trace shows SQL_SUCCESS. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * V97 FP1 or FP2 user * **************************************************************** * PROBLEM DESCRIPTION: * * SQLFreeHandle() for environment handle in CLI application * * * * returns 0 on DB2 V9.7 GA. * * * * However, it returns -1 on DB2 V9.7 FP1. * * Problem occurs only when we build it as 32-bit application * * on * * V9.7 FP1. * * On the other hand, this problem does not occur if we compile * * it as 64-bit. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 9.7 Fix Pack 3. * **************************************************************** | |
Local-Fix: | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in V9.7 FP3. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC68787 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 26.04.2010 03.10.2010 03.10.2010 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP3 | |
Problem behoben lt. FixList in der Version | |
9.7.0.3 | |
9.7.0.3 |