Details
Description
Check the code in sql_view.cc.
It does not seem to require DROP privilege to do "CREATE OR REPLACE VIEW".
It should, as "CREATE OR REPLACE" is actually two queries ("DROP VIEW IF EXISTS" followed by a "CREATE VIEW") run in a single shot.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
It actually works fine. DROP_ACL is checked.
Run as root:
Then run
and try to replace the view:
mysql> create or replace view v1 as select 2; ERROR 1142 (42000): DROP command denied to user 'user'@'localhost' for table 'v1'After adding DROP privilege to 'user', CREATE OR REPLACE works fine.