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.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 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.