[MDEV-7300] CREATE OR REPLACE VIEW does not require DROP privilege Created: 2014-12-10 Updated: 2015-02-26 Resolved: 2015-02-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | OTHER |
| Affects Version/s: | 10.0, 10.1 |
| Fix Version/s: | 10.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Check the code in sql_view.cc. It should, as "CREATE OR REPLACE" is actually two queries ("DROP VIEW IF EXISTS" followed by a "CREATE VIEW") run in a single shot. |
| Comments |
| Comment by Alexander Barkov [ 2015-02-26 ] | ||||||||||
|
It actually works fine. DROP_ACL is checked. Run as root:
Then run
and try to replace the view:
After adding DROP privilege to 'user', CREATE OR REPLACE works fine. |