Bug #15166 | Wrong update [was: select/update] permissions required to execute triggers | ||
---|---|---|---|
Submitted: | 23 Nov 2005 0:39 | Modified: | 14 Feb 2006 3:15 |
Reporter: | Omer Barnir (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | OS: | ||
Assigned to: | Alexander Nozdrin | CPU Architecture: | Any |
[23 Nov 2005 0:39]
Omer Barnir
[23 Nov 2005 1:51]
Beat Vontobel
I just copied over my comment from Bug #5861 on CURRENT_USER() in TRIGGERs. As 5.0.15 was already declared production (and I actually use it on my production servers and rely on existing functionality) I hope you'll be careful not to break existing things with release 5.0.17 as a lot of users will need this release for other (more critical) bug fixes. --- Comment from Bug #5861 --- I just noted this fix in the changelog for 5.0.17 and wondered: As one of the key applications of triggers is auditing, how can I now determine the user that triggered the action (INSERT or UPDATE) in the trigger? As this is usually what I need to know inside a trigger - and not who created it (as this is static and redundant information anyway). If the answer is "you can't" then I don't think this bugfix was really an improvement...
[23 Nov 2005 18:39]
Omer Barnir
Case #2 in this bug was moved and is now tracked in bug 15196 http://bugs.mysql.com/bug.php?id=15196 This bug can be closed once #1 is addressed Changed Synopsis and 'removed' 'select' referance
[23 Dec 2005 11:34]
Beat Vontobel
Just in case somebody hits this page when looking for information on CURRENT_USER in TRIGGERs I should probably correct my ignorant comment above. Use USER() or SESSION_USER() in TRIGGERs for auditing instead of CURRENT_USER. As a compensation i put up some more information on this on my blog: http://www.futhark.ch/mysql/116.html http://www.futhark.ch/mysql/123.html Sorry about my mistake!
[24 Jan 2006 17:20]
Alexander Nozdrin
Pushed into 5.0 tree, currently tagged 5.0.19.
[2 Feb 2006 5:02]
Mike Hillyer
Please set back to Documenting status when pushed into 5.1.
[6 Feb 2006 13:05]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/2188
[6 Feb 2006 14:00]
Alexander Nozdrin
Merged into 5.1 tree.
[7 Feb 2006 0:31]
Alexander Nozdrin
The 5.1 tree is currently tagged 5.1.7.
[7 Feb 2006 11:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/2238
[14 Feb 2006 3:15]
Paul DuBois
Noted in 5.0.19, 5.1.7 changelogs. The <literal>UPDATE</literal> privilege was being required even for triggers that performed no updates. (Bug #15166)