DB2 - Problembeschreibung
Problem IC95380 | Status: Geschlossen |
DB2 MIGHT PRODUCE INCORRECT RESULT WHEN EXECUTING A QUERY WITH DATETIME PREDICATES | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problembeschreibung: | |
DB2 might produce incorrect result when executing a query with datetime predicates. The incorrect result will only happen if the table has a timestamp of the form 'YYYY-DD-MM:HH:MM:SS:24.00.00.000000' db2 "create table tablexyz (ts TIMESTAMP DEFAULT '2999-12-31-24.00.00.000000')" db2 "insert into tablexyz values ('2999-12-31-24.00.00.000000')" db2 "select * from tablexyz" TS -------------------------- 2999-12-31-24.00.00.000000 1 record(s) selected. Example 1: db2 "select * from tablexyz where date(ts) = '2999-12-31'" ts -------------------------- 0 record(s) selected. Example 2: db2 "select * from tablexyz where year(ts) = 2999" TS -------------------------- 0 record(s) selected. Example 3: db2 "select * from tablexyz where year(ts) = 2999 and month(ts) = 12" TS -------------------------- 0 record(s) selected. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.5 and Fix Pack 3 * **************************************************************** | |
Local-Fix: | |
Workaround: Manually rewrite the predicate from date/year to timestamp format. Example1. select * from tablexyz where ts >= '2999-12-31-00.00.00.000000' and ts <= '2999-12-31-24.00.00.000000' example 2. select * from tablexyz where ts >= '2999-01-01-00.00.00.000000' and ts <= '2999-12-31-24.00.00.000000' select * from tablexyz where ts >= '2999-12-01-00.00.00.000000' and ts <= '2999-12-31-24.00.00.000000' | |
verfügbare FixPacks: | |
DB2 Version 10.5 Fix Pack 3 for Linux, UNIX, and Windows | |
Lösung | |
Problem was first fixed in DB2 Version 10.5 and Fix Pack 3 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 27.08.2013 27.02.2014 27.02.2014 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.5.0.3 | |
10.5.0.3 |