DB2 - Problembeschreibung
Problem IC97491 | Status: Geschlossen |
DATE PARAMETER MARKER IS NOT CONVERTED TO TIMESTAMP(0) IN A DATE AS TIMESTAMP(0) ENABLED DATABASE WITH DEFERRED PREPARE ENABLED | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problembeschreibung: | |
In a DATE as TIMESTAMP(0) enabled database, the data type DATE should always be treated as TIMESTAMP(0). However, when DB2_DEFERRED_PREPARE_SEMANTICS is enabled, a parameter marker that is set to the DATE data type will not be converted to TIMESTAMP(0). This may not cause any problem at all, or there may be various symptoms depending on how the parameter marker is used. This example would not have any problem since the query only looks at the year: select * from T where year(?) = year( current date ) The following query fails with SQLCODE -401: select * from T where DATECOL < ? + 1 The following query may return a wrong result because HOUR(?) always returns 0: select * from T where hour(?) = hour( current date ) In the next example, the returned value will be a simple DATE (year, month and day) instead of the expected TIMESTAMP(0): select ? from T | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 10.1 fix pack 4 * **************************************************************** | |
Local-Fix: | |
Explicitly set the parameter marker to data type TIMESTAMP instead of DATE | |
verfügbare FixPacks: | |
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows | |
Lösung | |
First fixed in DB2 version 10.1 fix pack 4 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC98756 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 07.11.2013 07.07.2014 07.07.2014 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.1.0.4 |