diff options
author | unknown <serg@serg.mylan> | 2005-03-23 09:42:24 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-23 09:42:24 +0100 |
commit | d27a709f3d811718c4174beeb0bd2d964bfcf87c (patch) | |
tree | bfec7a86898321f85706b5331aa18fdb1bc68fbb /mysql-test/t/grant2.test | |
parent | 903d1b6b51345213fba70e144873aa4a9f6b7c0c (diff) | |
parent | e2ca9c5b41df8f18f44e0529a72b141a9fc2b01b (diff) | |
download | mariadb-git-d27a709f3d811718c4174beeb0bd2d964bfcf87c.tar.gz |
merged
BitKeeper/etc/logging_ok:
auto-union
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/ndb_autodiscover.result:
Auto merged
mysql-test/r/ps_1general.result:
Auto merged
mysql-test/r/show_check.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/view.result:
Auto merged
scripts/fill_func_tables.sh:
Auto merged
scripts/mysql_create_system_tables.sh:
Auto merged
scripts/mysql_fix_privilege_tables.sh:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/field.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/table.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/grant2.test')
-rw-r--r-- | mysql-test/t/grant2.test | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index 7aefbb5d9ff..ffeea70763a 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -18,6 +18,7 @@ flush privileges; grant all privileges on `my\_1`.* to mysqltest_1@localhost with grant option; +grant create user on *.* to mysqltest_1@localhost; create user mysqltest_2@localhost; connect (user_a,localhost,mysqltest_1,,); connection user_a; @@ -30,7 +31,6 @@ grant update on mysql.* to mysqltest_1@localhost; connect (user_b,localhost,mysqltest_1,,); connection user_b; grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass'; ---error 1211 grant select on `my\_1`.* to mysqltest_3@localhost; disconnect user_b; connection default; @@ -52,6 +52,7 @@ flush privileges; # grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option; +grant create user on *.* to mysqltest_1@localhost; connect (user1,localhost,mysqltest_1,,); connection user1; select current_user(); @@ -68,7 +69,6 @@ set @@sql_mode='NO_AUTO_CREATE_USER'; select @@sql_mode; --error 1211 grant select on `my\_1`.* to mysqltest_4@localhost with grant option; ---error 1211 grant select on `my\_1`.* to mysqltest_4@localhost identified by 'mypass' with grant option; disconnect user1; @@ -248,9 +248,10 @@ show grants for '%@b'@'b'; show grants for '%@a'@'a'; drop user '%@a'@'a'; # -# USAGE WITH GRANT OPTION is sufficient. +# CREATE USER privilege is enough +# create user mysqltest_2@localhost; -grant usage on *.* to mysqltest_2@localhost with grant option; +grant create user on *.* to mysqltest_2@localhost; connect (user2,localhost,mysqltest_2,,); connection user2; --error 1142 @@ -262,22 +263,20 @@ disconnect user2; connection default; drop user mysqltest_2@localhost; # -# ALL PRIVILEGES without GRANT OPTION is not sufficient. +# INSERT/UPDATE/DELETE is ok too create user mysqltest_3@localhost; -grant all privileges on mysql.* to mysqltest_3@localhost; +grant INSERT,DELETE,UPDATE on mysql.* to mysqltest_3@localhost; connect (user3,localhost,mysqltest_3,,); connection user3; +show grants; +--error 1142 select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; insert into mysql.user set host='%', user='mysqltest_B'; ---error 1044 create user mysqltest_A@'%'; ---error 1044 rename user mysqltest_B@'%' to mysqltest_C@'%'; ---error 1044 -drop user mysqltest_B@'%'; +drop user mysqltest_C@'%'; disconnect user3; connection default; -drop user mysqltest_B@'%'; drop user mysqltest_3@localhost; # # Bug #3309: Test IP addresses with netmask |