On Wed, 2003-03-19 at 03:56, jpate@stripped wrote:
> >Description:
> when supplying one parameter to RAND() ie: RAND(20) it will always return the same
> value for the first row, (not dependant on seed)
> mysql> select rand(20) from table;
>
> | rand(20) |
> | 0.18109056370434 | <-- first row always returns this number, no matter what the
> seed is
> | 0.75023236568107 | <-- all rows after always return these numbers in this order
>
> | 0.20789016802599 | <-| (the further down the number, the further it will change
> with different seeds)
> | 0.78875377382036 | <-|
> | 0.32009839575747 | <-|
> | 0.23423068805992 | <-|
> | 0.21085828376083 | <-|
> | 0.35159938535802 | <-|
>
> rand(20) should always return the same number
> rand(21) should always return a different number than rand(20) but the same for all
> calls of rand(21)
>
Thank you for good bug report,
with your test case I was able to repeat the issue.
It exists only in MySQL 3.23 tree but not 4.0 tree.
As current solution I would recommend upgrading to MySQL 4.0.12
which is now qualified as stable.
We'll decide if this bug will be fixed in MySQL 3.23 tree - as old
stable tree this tree is to receive only critical bug fixes.
--
MySQL 2003 Users Conf. -> http://www.mysql.com/events/uc2003/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Peter Zaitsev <peter@stripped>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Moscow, Russia
<___/ www.mysql.com