Bug #54824 UPDATE changing primary key does not gen DELETE trigger
| Submitted: | 26 Jun 2010 11:25 | Modified: | 27 Jul 2010 12:46 |
|---|---|---|---|
| Reporter: | Tech Magos | Email Updates: | |
| Status: | No Feedback | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | Any | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[26 Jun 2010 11:25]
Tech Magos
[26 Jun 2010 11:36]
Valeriy Kravchuk
Whatever happens to some row in some storage engine internally when you execute UPDATE does NOT really matter. Only ON UPDATE trigger can be executed in this case, as logically(!) row is updated.
[27 Jun 2010 10:47]
Tech Magos
Sorry, when a row is disappearing, this is NOT an UPDATE, it is a logically a DELETE! AN UPDATE of a row where the Primary key is changing makes this row go away and a NEW row inserted. Nothing to do with storage engine at all. I am reopening in the hope that someone can see the point here. While i can also see why one may conveniently want to consider this as "not a bug" (as the word DELETE does not appear in the sql stmt), please do see this real world case: Certain apps may require some action when just rows are wiped/DELETED. In thos apps (logical) UPDATES happen at a ratio of 100,000 to 1, compared with DELETES. The app really needs to know when a row is gone but DELETE trigger does NOT give that. Subsribing for UPDATE trigger too is going to be 100,000 times slower. You may want to re-tag this a feature-request but pls do not close it. In my mind it is a logical bug.
[27 Jun 2010 12:46]
Valeriy Kravchuk
Can you, please, name any existing RDBMS that fires ON DELETE trigger when someone UPDATEs primary key value in some row? Any quote from any version of SQL standard maybe that requires this?
[27 Jul 2010 23:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 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.