Below is the list of changes that have just been committed into a local
5.0 repository of bell. When bell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1859 05/04/02 18:05:00 bell@stripped +3 -0
fix of required privileges for altering view VIEW (DELETE->DROP) (BUG#9260)
sql/sql_view.cc
1.39 05/04/02 18:03:34 bell@stripped +3 -3
fix of required privileges for altering view VIEW (DELETE->DROP)
mysql-test/t/view.test
1.63 05/04/02 18:03:34 bell@stripped +11 -1
fix of required privileges for altering view VIEW (DELETE->DROP)
new test of altering view
mysql-test/r/view.result
1.73 05/04/02 18:03:34 bell@stripped +6 -2
fix of required privileges for altering view VIEW (DELETE->DROP)
new test of altering view
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: bell
# Host: sanja.is.com.ua
# Root: /home/bell/mysql/bk/work-5.0
--- 1.72/mysql-test/r/view.result Fri Apr 1 02:13:22 2005
+++ 1.73/mysql-test/r/view.result Sat Apr 2 18:03:34 2005
@@ -237,13 +237,17 @@
grant create view,select on test.* to mysqltest_1@localhost;
create view v1 as select * from mysqltest.t1;
alter view v1 as select * from mysqltest.t1;
-ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1'
create or replace view v1 as select * from mysqltest.t1;
-ERROR 42000: DELETE command denied to user 'mysqltest_1'@'localhost' for table 'v1'
+ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 'v1'
create view mysqltest.v2 as select * from mysqltest.t1;
ERROR 42000: CREATE VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v2'
create view v2 as select * from mysqltest.t2;
ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 't2'
+grant create view,drop,select on test.* to mysqltest_1@localhost;
+use test;
+alter view v1 as select * from mysqltest.t1;
+create or replace view v1 as select * from mysqltest.t1;
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
revoke all privileges on test.* from mysqltest_1@localhost;
drop database mysqltest;
--- 1.62/mysql-test/t/view.test Tue Mar 15 19:54:39 2005
+++ 1.63/mysql-test/t/view.test Sat Apr 2 18:03:34 2005
@@ -181,7 +181,7 @@
connection user1;
create view v1 as select * from mysqltest.t1;
-# try to modify view without DELETE privilege on it
+# try to modify view without DROP privilege on it
-- error 1142
alter view v1 as select * from mysqltest.t1;
-- error 1142
@@ -192,6 +192,16 @@
# no SELECT privilege
-- error 1142
create view v2 as select * from mysqltest.t2;
+
+connection root;
+grant create view,drop,select on test.* to mysqltest_1@localhost;
+
+connection user1;
+# following 'use' command is workaround of bug #9582 and should be removed
+# when that bug will be fixed
+use test;
+alter view v1 as select * from mysqltest.t1;
+create or replace view v1 as select * from mysqltest.t1;
connection root;
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
--- 1.38/sql/sql_view.cc Fri Apr 1 02:13:23 2005
+++ 1.39/sql/sql_view.cc Sat Apr 2 18:03:34 2005
@@ -89,7 +89,7 @@
/*
Privilege check for view creation:
- user have CREATE VIEW privilege on view table
- - user have DELETE privilege in case of ALTER VIEW or CREATE OR REPLACE
+ - user have DROP privilege in case of ALTER VIEW or CREATE OR REPLACE
VIEW
- have some (SELECT/UPDATE/INSERT/DELETE) privileges on columns of
underlying tables used on top of SELECT list (because it can be
@@ -104,9 +104,9 @@
0, 0) ||
grant_option && check_grant(thd, CREATE_VIEW_ACL, view, 0, 1, 0)) ||
(mode != VIEW_CREATE_NEW &&
- (check_access(thd, DELETE_ACL, view->db, &view->grant.privilege,
+ (check_access(thd, DROP_ACL, view->db, &view->grant.privilege,
0, 0) ||
- grant_option && check_grant(thd, DELETE_ACL, view, 0, 1, 0))))
+ grant_option && check_grant(thd, DROP_ACL, view, 0, 1, 0))))
DBUG_RETURN(TRUE);
for (sl= select_lex; sl; sl= sl->next_select())
{
| Thread |
|---|
| • bk commit into 5.0 tree (bell:1.1859) BUG#9260 | sanja | 2 Apr |