Description:
MySQL does not return random enough values for the first rand() call after connection is established. It looks like it is not seeded well enough:
How to repeat:
Notice numbers does not seems to have even distribution in the range from 0-1
pz@abyss:~> mysql -u root -e "select round(rand(),2)";
+-----------------+
| round(rand(),2) |
+-----------------+
| 0.40 |
+-----------------+
pz@abyss:~> mysql -u root -e "select round(rand(),2)";
+-----------------+
| round(rand(),2) |
+-----------------+
| 0.40 |
+-----------------+
pz@abyss:~> mysql -u root -e "select round(rand(),2)";
+-----------------+
| round(rand(),2) |
+-----------------+
| 0.40 |
+-----------------+
pz@abyss:~> mysql -u root -e "select round(rand(),2)";
+-----------------+
| round(rand(),2) |
+-----------------+
| 0.41 |
+-----------------+
pz@abyss:~> mysql -u root -e "select round(rand(),2)";
+-----------------+
| round(rand(),2) |
+-----------------+
| 0.40 |
+-----------------+