DB2 - Problembeschreibung
Problem IC63931 | Status: Geschlossen |
FUNCTIONS DAYNAME & MONTHNAME MAY RETURN INCORRECT RESULTS IF IN PUT IS NOT TIMESTAMP AND SYSTEM IS SET_UP WITH NON-EN_US LOCALE | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problembeschreibung: | |
The scalar functions DAYNAME and MONTHNAME may be resolved as SYSFUN version instead of SYSIBM version when the expression argument is not a timestamp. The SYSFUN version may return different results because the SYSFUN version does not depend on the CURRENT LOCALE LC_TIME special register. For example, if the CURRENT LOCALE LC_TIME is a fr_FR locale then the correct output for MONTHNAME('2007-03-09-14.07.38.123456') would be 'mars'. But since the expression is not a timestamp, the en_US value of 'March' is returned in error. If the locale is en_US, then this problem will not occur and the correct results will be returned. The problem only has impact for locales other than en_US. However, please, note that SYSFUN version will not perform as well as the SYSIBM version. This APAR will ensure that SYSIBM version is used and will improve performance for en_US locales as well. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * DB2 LUW v97 * **************************************************************** * PROBLEM DESCRIPTION: * * The scalar functions DAYNAME and MONTHNAME may be resolved * * as * * SYSFUN version instead of SYSIBM version when the expression * * * * argument is not a timestamp. The SYSFUN version may return * * * * different results because the SYSFUN version does not * * * * depend on the CURRENT LOCALE LC_TIME special register. * * * * * * * * For example, if the CURRENT LOCALE LC_TIME is a fr_FR locale * * * * then the correct output for * * * * MONTHNAME('2007-03-09-14.07.38.123456') would be 'mars'. * * But * * since the expression is not a timestamp, the en_US value of * * * * 'March' is returned in error. * * * * * * * * If the locale is en_US, then this problem will not occur and * * the * * correct results will be returned. * * * * The problem only has impact for locales other than en_US. * * * * However, please, note that SYSFUN version will not perform * * as * * well as the SYSIBM version. * * * * This APAR will ensure that SYSIBM version is used and will * * * * improve performance for en_US locales as well. * **************************************************************** * RECOMMENDATION: * * Install DB2 LUW v97 fixpak 1. * **************************************************************** | |
Local-Fix: | |
Two possible local fixes are: 1) Qualify the function with SYSIBM, for example SYSIBM.MONTHNAME('2007-03-09-14.07.38.123456') will return 'mars' in a fr_FR locale as expected 2) Specify the expression with type as timestamp, for example MONTHNAME(timestamp '2007-03-09-14.07.38.123456') will return 'mars' in a fr_FR locale as expected | |
verfügbare FixPacks: | |
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows | |
Lösung | |
Install DB2 LUW v97 fixpak 1. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 21.10.2009 17.02.2010 17.02.2010 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
9.7. | |
Problem behoben lt. FixList in der Version | |
9.7.0.1 |