DB2 - Problem description
Problem IC77650 | Status: Closed |
DB2CLI CRASHES WHEN ODBC IS ON AND SQLGETDIAGFIELD IS CALLED FOR UN-ALLOCATED STATEMENT HANDLE ON WINDOWS. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
DB2CLI CRASHES WHEN ODBC IS ON AND SQLGETDIAGFIELD IS CALLED FOR UN-ALLOCATED STATEMENT HANDLE ON WINDOWS. Steps to reproduce opt callerror on opt callodbc on configdsn tttt add SQLAllocHandle SQL_HANDLE_ENV 0 1 SQLAllocHandle SQL_HANDLE_DBC 1 1 SQLDriverConnect 1 0 "DSN=tttt" -3 255 SQL_DRIVER_NOPROMPT sqlgetdiagfield sql_handle_stmt 1 0 SQL_DIAG_OVERRIDE_SQLSTATE "12345" It crashes here. If there is a allocstmt just before the last statement it would not crash. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * When ODBC is used on Windows. * **************************************************************** * PROBLEM DESCRIPTION: * * DB2CLI CRASHES WHEN ODBC IS ON AND SQLGETDIAGFIELD IS CALLED * * FOR * * UN-ALLOCATED STATEMENT HANDLE ON WINDOWS. * * * * Steps to reproduce * * * * * * * * opt callerror on * * * * opt callodbc on * * * * configdsn tttt add * * * * SQLAllocHandle SQL_HANDLE_ENV 0 1 * * * * SQLAllocHandle SQL_HANDLE_DBC 1 1 * * * * SQLDriverConnect 1 0 "DSN=tttt" -3 255 SQL_DRIVER_NOPROMPT * * * * sqlgetdiagfield sql_handle_stmt 1 0 * * SQL_DIAG_OVERRIDE_SQLSTATE * * "12345" * * * * * * * * It crashes here. If there is a allocstmt just before the * * last * * statement it would not crash. * **************************************************************** * RECOMMENDATION: * * Upgrade to db2_v97fp5 or later releases. * **************************************************************** | |
Local Fix: | |
Do not call sqlgetdiagfield for un-allocated statement handle. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
Solution | |
db2_v97fp5 contains the fix of this issue. After fix, crash will not happen. user will get appropriate error. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 21.07.2011 12.12.2011 12.12.2011 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.5 |