DB2 - Problem description
Problem IC63946 | Status: Closed |
In DPF environent, RAND() scalar fnuction returns repeating values. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
In a DPF environment, rand scalar function does not work properly. It specified with/without seed value, rand function does not work properly. For example. Execute same sql 2 times. select c1,rand() from test1 order by 2 select c1,rand() from test1 order by 2 The expected results of these SQLs, returned random values from rand. However, it returned SAME VALUES. First time Second time C1 2 C1 2 ----- ---------------------- ----- ---------------------- 1 +0.00000000000000E+000 1 +0.00000000000000E+000 6 +0.00000000000000E+000 6 +0.00000000000000E+000 10 +0.00000000000000E+000 10 +0.00000000000000E+000 5 +0.00000000000000E+000 5 +0.00000000000000E+000 9 +0.00000000000000E+000 9 +0.00000000000000E+000 8 +1.06753746147038E-001 8 +1.06753746147038E-001 3 +3.04818872646260E-001 3 +3.04818872646260E-001 2 +6.55171361430708E-001 2 +6.55171361430708E-001 7 +6.55171361430708E-001 7 +6.55171361430708E-001 4 +6.74977874080630E-001 4 +6.74977874080630E-001 For example. Execute same sql 2 times. select c1,rand(1) from test1 order by 2 select c1,rand(1) from test1 order by 2 The expected results of these SQLs, returned same columns order from rand. However, it returned NOT SAME COLUMNS ORDER. First time Second time C1 2 C1 2 ----- ---------------------- ----- ---------------------- 6 +1.24698629718925E-001 9 +1.24698629718925E-001 2 +1.71727652821436E-001 2 +1.71727652821436E-001 9 +1.75725577562792E-001 7 +1.75725577562792E-001 4 +2.26416821802423E-001 4 +2.26416821802423E-001 5 +3.08633686330760E-001 6 +3.08633686330760E-001 8 +4.94766075624866E-001 8 +4.94766075624866E-001 10 +5.13870662556841E-001 5 +5.13870662556841E-001 7 +5.34531693472091E-001 10 +5.34531693472091E-001 3 +7.02230903042695E-001 3 +7.02230903042695E-001 1 +9.47630237739189E-001 1 +9.47630237739189E-001 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * rand() returned unexpected results. * **************************************************************** * PROBLEM DESCRIPTION: * * See APAR description. * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 UDB version 9.7 FixPack 1 * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 UDB Version 9.7 FixPack 1 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 22.10.2009 17.12.2009 17.12.2009 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP1 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.1 |