Bug #117612 | EVAL in UPDATE statement changes row value before statement is fully parsed | ||
---|---|---|---|
Submitted: | 3 Mar 22:42 | Modified: | 4 Mar 11:05 |
Reporter: | Dov Endress | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 8.0.40, 8.0.41, 8.4.4 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[3 Mar 22:42]
Dov Endress
[4 Mar 6:43]
MySQL Verification Team
Hello Dov Endress, Thank you for the report and feedback. Thanks, Umesh
[4 Mar 11:05]
Roy Lyseng
Posted by developer: I don't think this should be considered a bug. It is similar to how an UPDATE statement will process a row, and this is documented as follows: If you access a column from the table to be updated in an expression, UPDATE uses the current value of the column. For example, the following statement sets col1 to one more than its current value: UPDATE t1 SET col1 = col1 + 1; The second assignment in the following statement sets col2 to the current (updated) col1 value, not the original col1 value. The result is that col1 and col2 have the same value. This behavior differs from standard SQL. UPDATE t1 SET col1 = col1 + 1, col2 = col1;