Bug #2117 | UPDATE with subquery | ||
---|---|---|---|
Submitted: | 15 Dec 2003 10:18 | Modified: | 20 Jan 2004 11:24 |
Reporter: | Jordi Garcia | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.1.1 | OS: | Windows (Windows) |
Assigned to: | Oleksandr Byelkin | CPU Architecture: | Any |
[15 Dec 2003 10:18]
Jordi Garcia
[15 Dec 2003 10:46]
Dean Ellis
Verified in 4.1.2. Notice that the error message itself is unusual. Thank you.
[15 Dec 2003 10:52]
MySQL Verification Team
This is not an UPDATE with sub-selects. This is an UPDATE with derived tables. multi-table UPDATEs with derived tables in the join table list will not be supported until further notice.
[15 Dec 2003 12:32]
Jordi Garcia
Hi again, I'm sure you're very busy but as long as there's nothing I can do about that (except for switching back to version 4.1.0), can you tell me how long this issue will be deferred? or may be anyone can give me another solution? Thank you in advance.
[2 Jan 2004 7:27]
Sergei Golubchik
In MySQL 4.1.0 there was no check for derived table in UPDATE at all, thus one could've written UPDATE (SELECT SIN(x) as y FROM a) b SET b.y=10; which is obviously wrong. It was fixed. But looks like now the syntax is too strict, and excludes some valid (and useful) usages of derived tables in the UPDATE statement. We'll try to fix it and make the check more specific.
[4 Jan 2004 13:46]
Oleksandr Byelkin
ChangeSet 1.1675 04/01/04 23:44:33 bell@sanja.is.com.ua +29 -0 allow UPDATE and DELETE stetements with tables derived from subquery if they are not updated (BUG#2117) allow delete table by alias in multi-delete statement
[20 Jan 2004 11:24]
Oleksandr Byelkin
Thank You for your bugreport. Bugfix is now pushed in our sorce repository and will be present in next 4.1 release.