Bug #19792 | With ORDER BY RAND() updated variable values are not visible in query results | ||
---|---|---|---|
Submitted: | 13 May 2006 3:47 | Modified: | 2 Aug 2006 19:34 |
Reporter: | Gerardo Narvaja | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 5.0.21 and previous | OS: | Windows (Windows XP) |
Assigned to: | Iggy Galarza | CPU Architecture: | Any |
[13 May 2006 3:47]
Gerardo Narvaja
[13 May 2006 12:33]
Hartmut Holzgraefe
Verified, attaching simplified test case as this is just about variables and ORDER BY RAND() and not specific to DATE_ADD() See also bug #16861
[13 May 2006 12:36]
Hartmut Holzgraefe
mysqltest test case
Attachment: bug19792.tar.gz (application/x-gzip, text), 869 bytes.
[25 Jul 2006 20:18]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/9552
[2 Aug 2006 19:34]
Iggy Galarza
This is an example of a statement that assigns and uses a variable in different parts of the same statement. Please see the user variable MySQL Manual Entry (http://dev.mysql.com/doc/refman/5.0/en/user-variables.html) where it states: " The general rule is to never assign a value to a user variable in one part of a statement and use the same variable in some other part the same statement. You might get the results you expect, but this is not guaranteed. " Also, please see bug# 1739 for more information.