DB2 - Problembeschreibung
Problem IC98756 | 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 / A50 - 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 Cancun Release 10.5.0.4 * **************************************************************** | |
Local-Fix: | |
Explicitly set the parameter marker to data type TIMESTAMP instead of DATE | |
verfügbare FixPacks: | |
DB2 Cancun Release 10.5.0.4 (also known as Fix Pack 4) for Linux, UNIX, and Windows | |
Lösung | |
First fixed in DB2 Cancun Release 10.5.0.4 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 15.01.2014 15.09.2014 15.09.2014 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.5.0.4 |