Bug #75 Bug with user defined variables
| Submitted: | 15 Feb 2003 16:01 | Modified: | 15 Feb 2003 23:31 |
|---|---|---|---|
| Reporter: | jocelyn fournier (Silver Quality Contributor) | Email Updates: | |
| Status: | Won't fix | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | all | OS: | Any (all) |
| Assigned to: | CPU Architecture: | Any |
[15 Feb 2003 16:01]
jocelyn fournier
[15 Feb 2003 23:31]
Michael Widenius
This is not a bug; The time of assignment is not defined (and can't be) when you set a variable in a SELECT or WHERE statement. This is because the columns in the SELECT part may be calculated at different points in time (when crearing a temporary table for the results, when result is sent to client etc) and may even be calculated multiple times, depending on how MySQL resolves the query. The simple rule is that never set and use a variable in the same statement. This is also documented in the manual.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.