Bug #94813 | Variable assignment in select taking the previous value of the variable | ||
---|---|---|---|
Submitted: | 28 Mar 2019 10:57 | Modified: | 28 Mar 2019 13:46 |
Reporter: | Arjun Ramachandra | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any |
[28 Mar 2019 10:57]
Arjun Ramachandra
[28 Mar 2019 13:46]
MySQL Verification Team
Hi, Thank you for your bug report. However, this is not a bug, but a behaviour described in our Reference Manual. Simply, the order of expression evaluation in the SELECT list is not guaranteed, which is stipulated by SQL standard. Try first to SET the variable and then use it in the SELECT query.