Bug #9689 | wrong result for subselect in on duplicate key update (query cache) | ||
---|---|---|---|
Submitted: | 6 Apr 2005 17:37 | Modified: | 22 Apr 2005 21:10 |
Reporter: | Martin Friebe (Gold Quality Contributor) (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 4.1.11 | OS: | Any (*) |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
[6 Apr 2005 17:37]
Martin Friebe
[22 Apr 2005 21:10]
Igor Babaev
(select max(a)+1 from t1) is not correlated subquery and it returns a constant with a particular contents of table t1. In our case it returns 4 (max(1,2,3)+1=4). So we try to update setting a to 4 on both updates.