Fixed
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
Brad WoodBrad WoodLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
NoneFix versions
Priority
New
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Brad Wood
Brad WoodLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Fix versions
Priority
Created 11 April 2023 at 22:06
Updated 18 April 2023 at 16:16
Resolved 17 April 2023 at 14:00
HSQLDB has a rand() function that some users use. Put a native rand() implementation into QoQ.
HSQLDB, MySQL, and SQL Server all use the following implementation
The RAND() function returns a random number between 0 and 1 (exclusive).
The optional
seed
parameter works like so:If seed is specified, it returns a repeatable sequence of random numbers. If no seed is specified, it returns a completely random number
This means the same Random generator must be re-used for the entire query such that the pseudo-random sequence will always be the same for a given seed value.
Ex:
SELECT rand() differentEveryTime FROM qry
and
SELECT rand(1) setSeed, rand() repeated, rand() repeated2 FROM qry
On repeated executions of the last query, the same random values would always be used for the given seed value of 1.