The system isn't displaying random quips

RESOLVED DUPLICATE of bug 192247

Status

()

--
trivial
RESOLVED DUPLICATE of bug 192247
16 years ago
6 years ago

People

(Reporter: edmudama, Assigned: myk)

Tracking

Details

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; T312461)
Build Identifier: 

I looked at the code in buglist.cgi and it appears to be fine, and when I run 
the same query manually via mysql's client, I get the correct results:

SELECT quip FROM quips WHERE approved=1 ORDER BY RAND() LIMIT 1;

will return a random quip.

However, via bugzilla I *always* get the same quip, with about 200+ tests.  I 
think the RAND() generator is just cruddy... perhaps some sort of seed should 
be sent from bugzilla within buglist.cgi to ensure that this randomizes?

The key is that I only have 2 quips in my database, and the 2nd one is always 
displayed.  I haven't tried adding a 3rd to see if that changes the behavior.

Reproducible: Always

Steps to Reproduce:
1. add 2 quips to a fresh install
2. query the buglist
3.

Actual Results:  
I always get quip #2

Expected Results:  
I should get a random choice of #1 or #2


I have no idea how the ORDER BY RAND() mechanics in MySQL are functioning, but 
it is odd to me that the direct query version is giving me different results 
than the bugzilla web version.

Marking it as trivial since it doesn't hurt operation of the overall system.

*** This bug has been marked as a duplicate of 192247 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 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.