title: ORDER BY RAND() seems to be less than random
body: <p>I have a fairly simple SQL (MySQL):</p>
  
  <pre><code>SELECT foo FROM bar ORDER BY rank, RAND()
  </code></pre>
  
  <p>I notice that when I refresh the results, the randomness is suspiciously weak.</p>
  
  <p>In the sample data at the moment there are six results with equal rank (integer zero). There are lots of tests for randomness but here is a simple one to do by hand: <em>when run twice, the first result should be the same in both runs about one sixth of the time</em>. This is certainly not happening, the leading result is the same at least a third of the time.</p>
  
  <p>I want a uniform distribution over the permutations. I'm not an expert statistician but I'm pretty sure <code>ORDER BY RAND()</code> should achieve this. What am I missing?</p>
  
  <p>With MySQL, <code>SELECT rand(), rand()</code> shows two different numbers, so I don't buy the "once per query" explanation</p>