DB2 - Problem description
| Problem IC74468 | Status: Closed |
CLP WITH -V OPTION MAY CAUSE ACCESS VIOLATION IF STATEMENT > 128KB AND CONTAINS LINE FEED. | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
| Problem description: | |
CLP may cause access violation if all the following conditions
are met:
- The statement is greater than 128KB.
- The statement contains line feed.
- db2.exe is running on Windows platforms.
- DB2 V9.7 FP3 or later.
Stack trace generated by db2.exe is like as follows:
db2clpfp!clp_replace_LFtoCRLF
db2clpfp!clp_print_output
db2clpfp!clp_execmd
db2clpfp!clp_execinp
db2clpfp!clp_fp_con
db2clpfp!clp_api
db2!main
The following steps illustrate how the problem occurs.
1. Create a CLP script like as below:
p1.sql
------------------------------------------
create procedure proc1 (in input1 integer)
result sets 1
language sql
begin
declare c1 int default 1;
declare c2 int default 0;
set c2 = c2 + c1;
: -- repeat 6300 lines
set c2 = c2 + c1;
end
@
------------------------------------------
2. Run the script with -v option
C:\>db2 -td@ -vf p1.sql | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Users who use statement text greater than 128KB via CLP on * * Windows. * **************************************************************** * PROBLEM DESCRIPTION: * * CLP may cause access violation if all the following * * conditions are met: * * * * - The statement is greater than 128KB. * * - The statement contains line feed. * * - db2.exe is running on Windows platforms. * * - DB2 V9.7 FP3 or later. * * * * Stack trace generated by db2.exe is like as follows: * * * * db2clpfp!clp_replace_LFtoCRLF * * db2clpfp!clp_print_output * * db2clpfp!clp_execmd * * db2clpfp!clp_execinp * * db2clpfp!clp_fp_con * * db2clpfp!clp_api * * db2!main * * * * The following steps illustrate how the problem occurs. * * * * 1. Create a CLP script like as below: * * * * p1.sql * * ------------------------------------------ * * create procedure proc1 (in input1 integer) * * result sets 1 * * language sql * * begin * * declare c1 int default 1; * * declare c2 int default 0; * * set c2 = c2 + c1; * * : -- repeat 6300 lines * * set c2 = c2 + c1; * * end * * @ * * ------------------------------------------ * * * * 2. Run the script with -v option * * C:\>db2 -td@ -vf p1.sql * **************************************************************** * RECOMMENDATION: * * Please upgrade to V9.7 FixPack 5 or later. * **************************************************************** | |
| Local Fix: | |
Please remove -v option. | |
| available fix packs: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
| Solution | |
This problem is first fixed in DB2 V9.7 FixPack 5. | |
| Workaround | |
not known / see Local fix | |
| BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC74978 follow-up : | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 15.02.2011 19.01.2012 19.01.2012 |
| Problem solved at the following versions (IBM BugInfos) | |
9.7.FP5 | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.7.0.5 |
|