DB2 - Problem description
Problem IC65495 | Status: Closed |
A CLI TRACE FAILS TO DISPLAY THE CONTENTS OF THE APPLICATION BUF FER IF THE COLUMN OR PARAMETER WAS BOUND WITH A CBVALUEMAX OF 0 | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
When taking a CLI trace of an application, the application buffer holding the column value or parameter marker value may be empty if the application sets the cbValueMax value to 0. For example, the following CLI trace snippet shows the problem: [11/18/2009 18:51:11.702023] SQLBindParameter( hStmt=1:1, iPar=1, fParamType=SQL_PARAM_INPUT, fCType=SQL_C_CHAR, fSQLType=SQL_CHAR, cbColDef=3, ibScale=0, rgbValue=&0012fb18, cbValueMax=3, pcbValue=&0012ff68 ) [11/18/2009 18:51:11.719392] ---> Time elapsed - +1.720000E-003 seconds [11/18/2009 18:51:11.721445] SQLBindParameter( ) [11/18/2009 18:51:11.723404] <--- SQL_SUCCESS Time elapsed - +2.138100E-002 seconds [11/18/2009 18:51:11.725410] SQLBindParameter( hStmt=1:1, iPar=2, fParamType=SQL_PARAM_INPUT, fCType=SQL_C_CHAR, fSQLType=SQL_CHAR, cbColDef=3, ibScale=0, rgbValue=&0012fb14, cbValueMax=0, pcbValue=&0012ff6c ) [11/18/2009 18:51:11.745735] ---> Time elapsed - +2.006000E-003 seconds [11/18/2009 18:51:11.747729] SQLBindParameter( ) [11/18/2009 18:51:11.749509] <--- SQL_SUCCESS Time elapsed - +2.409900E-002 seconds ................. [11/18/2009 18:51:11.751517] SQLExecute( hStmt=1:1 ) [11/18/2009 18:51:11.755183] ---> Time elapsed - +2.008000E-003 seconds [11/18/2009 18:51:11.756969] ( Package="SYSSH200 ", Section=4 ) [11/18/2009 18:51:11.762341] [11/18/2009 18:51:11.764467] ( Row=1, iPar=1, fCType=SQL_C_CHAR, rgbValue="ABC" - x'414243', pcbValue=-3, piIndicatorPtr=-3 ) [11/18/2009 18:51:11.777222] [11/18/2009 18:51:11.778995] ( Row=1, iPar=2, fCType=SQL_C_CHAR, rgbValue="" - x'', pcbValue=-3, piIndicatorPtr=-3 ) [11/18/2009 18:51:11.791185] In this case we have two parameters. The value in the first parameter shows up fine when the statement is executed, however the value in the second parameter does not show up fine. The application calls the SQLBindParameter() API with a cbValueMax value of 0 on the second parameter. When the statement is executed, the "rgbValue" shows up as empty string. This is not expected. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * When taking a CLI trace of an application, the * * applicationbuffer holding the column value or parameter * * marker valuemay be empty if the application sets the * * cbValueMax value to0.For example, the following CLI trace * * snippet shows theproblem:[11/18/2009 18:51:11.702023] * * SQLBindParameter( hStmt=1:1,iPar=1, * * fParamType=SQL_PARAM_INPUT, * * fCType=SQL_C_CHAR,fSQLType=SQL_CHAR, cbColDef=3, * * ibScale=0,rgbValue=&0012fb18, cbValueMax=3, * * pcbValue=&0012ff68 )[11/18/2009 18:51:11.719392] ---> Time * * elapsed -+1.720000E-003 seconds[11/18/2009 18:51:11.721445] * * SQLBindParameter( )[11/18/2009 18:51:11.723404] <--- * * SQL_SUCCESS Time elapsed -+2.138100E-002 seconds[11/18/2009 * * 18:51:11.725410] SQLBindParameter( hStmt=1:1,iPar=2, * * fParamType=SQL_PARAM_INPUT, * * fCType=SQL_C_CHAR,fSQLType=SQL_CHAR, cbColDef=3, * * ibScale=0,rgbValue=&0012fb14, cbValueMax=0, * * pcbValue=&0012ff6c )[11/18/2009 18:51:11.745735] ---> Time * * elapsed -+2.006000E-003 seconds[11/18/2009 18:51:11.747729] * * SQLBindParameter( )[11/18/2009 18:51:11.749509] <--- * * SQL_SUCCESS Time elapsed -+2.409900E-002 * * seconds.................[11/18/2009 18:51:11.751517] * * SQLExecute( hStmt=1:1 )[11/18/2009 18:51:11.755183] ---> * * Time elapsed -+2.008000E-003 seconds[11/18/2009 * * 18:51:11.756969] ( Package="SYSSH200 ",Section=4 * * )[11/18/2009 18:51:11.762341][11/18/2009 18:51:11.764467] ( * * Row=1, iPar=1,fCType=SQL_C_CHAR, rgbValue="ABC" - x'414243', * * pcbValue=-3,piIndicatorPtr=-3 )[11/18/2009 * * 18:51:11.777222][11/18/2009 18:51:11.778995] ( Row=1, * * iPar=2,fCType=SQL_C_CHAR, rgbValue="" - x'', * * pcbValue=-3,piIndicatorPtr=-3 )[11/18/2009 * * 18:51:11.791185]In this case we have two parameters. The * * value in the firstparameter shows up fine when the statement * * is executed,however the value in the second parameter does * * not show upfine.The application calls the SQLBindParameter() * * API with acbValueMax value of 0 on the second parameter. * * When thestatement is executed, the "rgbValue" shows up as * * emptystring. This is not expected. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v9.7, Fixpak 2 * **************************************************************** | |
Local Fix: | |
Set the cbValueMax to a value that coincides with the maximum length of the application buffer that holds (or will hold) the contents of the data instead of to a value of 0. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 UDB Version 9.7, Fixpak 2 | |
Workaround | |
See LOCAL FIX | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 11.01.2010 25.05.2010 25.05.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.7. | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.2 |