DB2 - Problembeschreibung
Problem IC62908 | Status: Geschlossen |
CLI APPLICATION MIGHT FAIL WITH CLI0612E IF SQL STATEMENT INCLUDES BLOCK COMMENT WITH NULTI-BYTE CHARACTERS. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
DB2 CLI may fail to count number of parameter markers if SQL statements include comment(s) with multi-byte characters. CLI Application receives CLI0612E when it tries to bind a parameter to the parameter markers. The following steps illustrates one of the scenario to cause this problem. . 1. We have following query includes Japanese comment string. . select * from org where deprnumb = ? and /*<4 Japanese Characters>*/ manager = ? . 2. Prepare the statement and set values by using Legacy JDBC Driver. . PreparedStatement stmt = conn.prepareStatement(sql); stmt.setInt(1, 10); stmt.setInt(2, 160); . 3. Second setInt() fails with CLI0612E because SQLNumParams reports the statement includes only one parameter marker, and CLI thinks index 2 is out of range. . Exception: COM.ibm.db2.jdbc.DB2Exception: IBM JDBC Driver CLI0612E Invalid parameter number. SQLSTATE=S1093 . CLI trace: SQLPrepareW( hStmt=1:1, pszSqlStr="select * from org ...) SQLPrepareW( ) <--- SQL_SUCCESS SQLNumParams( hStmt=1:1, pcPar=&0007fc48 ) SQLNumParams( pcPar=1 ) // This should be 2. <--- SQL_SUCCESS | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * Users who uses multi-bytes characters in SQL comments. * **************************************************************** * PROBLEM DESCRIPTION: * * DB2 CLI may fail to count number of parameter markers if SQL * * * * statements include comment(s) with multi-byte characters. * * CLI * * Application receives CLI0612E when it tries to bind a * * parameter * * to the parameter markers. * * The SQL might fails with SQL0104N. * **************************************************************** * RECOMMENDATION: * **************************************************************** | |
Local-Fix: | |
Please remove SQL comments which contains multi-byte characters. | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in Version 9.7 Fixpack 1 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 01.09.2009 17.12.2009 17.12.2009 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7.FP1 | |
Problem behoben lt. FixList in der Version | |
9.7.0.1 |