Closed Bug 200964 Opened 23 years ago Closed 23 years ago

quips do not appear randomly - always the first quip is presented

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 192247

People

(Reporter: michaelk, Assigned: endico)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030315 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030315 Quips on buglist should be randomly selected, but in platforms running certain versions of mysql, only the first quip is ever displayed. This appears to be a bug in the "order by rand()" select qualifier in mysql. The work around is to run RAND() a number of times before using it. The following seens to be a fix to buglist.cgi This seems to fix the problem..... *** orig/buglist.cgi 2003-04-06 19:16:33.000000000 -0400 --- buglist.cgi 2003-04-06 19:18:34.000000000 -0400 *************** *** 190,195 **** --- 190,196 ---- my $quip; + SendSQL("BENCHMARK(10,RAND())"); SendSQL("SELECT quip FROM quips ORDER BY RAND() LIMIT 1"); if (MoreSQLData()) { Reproducible: Always Steps to Reproduce: 1. run a query 2. examine the 'quip' on buglist.cgi 3. repeat, and notice that the quip remains the same Actual Results: quip was always the same Expected Results: a random quip should have been returned using mozilla 2.17.3 This is using mysql 3.23.54 (shipped with RedHat 8.0 & RedHat 9.0) This bug is supposed to be fixed in mysql 4.0 (but I can't verify this)
*** This bug has been marked as a duplicate of 192247 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.