Bug #9260 Views: CREATE OR REPLACE VIEW/ALTER VIEW require incorrect privilege
Submitted: 18 Mar 2005 3:27 Modified: 5 Apr 2005 0:01
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3 BK OS:
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[18 Mar 2005 3:27] Paul DuBois
Description:
CREATE VIEW, CREATE OR REPLACE VIEW, and
ALTER VIEW all require the CREATE VIEW privilege.
In addition, CREATE OR REPLACE VIEW and
ALTER VIEW require the DELETE privilege, but
that is incorrect. Replacing/altering a view involves
dropping the view (a table-level operation), but
DELETE is a row-level privilege.  The required privilege
should be DROP rather than DELETE.

How to repeat:
Take a look at sql_view.cc
[2 Apr 2005 15: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/internals/23582
[2 Apr 2005 15:07] Oleksandr Byelkin
ChangeSet
  1.1859 05/04/02 18:05:00 bell@sanja.is.com.ua +3 -0
  fix of required privileges for altering view VIEW (DELETE->DROP) (BUG#9260)
[2 Apr 2005 15:56] Oleksandr Byelkin
Thank you for bugreport!

patch is pushed into 5.0.4 source tree
[5 Apr 2005 0:01] Paul DuBois
Noted in 5.0.4 changelog.