summaryrefslogtreecommitdiff
path: root/mysql-test/r/grant2.result
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-03-23 09:42:24 +0100
committerunknown <serg@serg.mylan>2005-03-23 09:42:24 +0100
commitd27a709f3d811718c4174beeb0bd2d964bfcf87c (patch)
treebfec7a86898321f85706b5331aa18fdb1bc68fbb /mysql-test/r/grant2.result
parent903d1b6b51345213fba70e144873aa4a9f6b7c0c (diff)
parente2ca9c5b41df8f18f44e0529a72b141a9fc2b01b (diff)
downloadmariadb-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/r/grant2.result')
-rw-r--r--mysql-test/r/grant2.result23
1 files changed, 11 insertions, 12 deletions
diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result
index ecd43cc2860..9f9dc7adcfa 100644
--- a/mysql-test/r/grant2.result
+++ b/mysql-test/r/grant2.result
@@ -6,6 +6,7 @@ delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
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;
grant select on `my\_1`.* to mysqltest_2@localhost;
grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass';
@@ -13,7 +14,6 @@ ERROR 42000: You must have privileges to update tables in the mysql database to
grant update on mysql.* to mysqltest_1@localhost;
grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass';
grant select on `my\_1`.* to mysqltest_3@localhost;
-ERROR 42000: 'mysqltest_1'@'localhost' is not allowed to create new users
grant insert on mysql.* to mysqltest_1@localhost;
grant select on `my\_1`.* to mysqltest_3@localhost;
grant select on `my\_1`.* to mysqltest_4@localhost identified by 'pass';
@@ -23,6 +23,7 @@ delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
grant all privileges on `my\_%`.* to mysqltest_1@localhost with grant option;
+grant create user on *.* to mysqltest_1@localhost;
select current_user();
current_user()
mysqltest_1@localhost
@@ -44,7 +45,7 @@ with grant option;
ERROR 42000: 'mysqltest_1'@'localhost' is not allowed to create new users
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
-GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
+GRANT CREATE USER ON *.* TO 'mysqltest_1'@'localhost'
GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
show grants for mysqltest_2@localhost;
ERROR 42000: There is no such grant defined for user 'mysqltest_2' on host 'localhost'
@@ -228,7 +229,7 @@ GRANT USAGE ON *.* TO '%@a'@'a'
GRANT SELECT ON "mysql".* TO '%@a'@'a'
drop user '%@a'@'a';
create user mysqltest_2@localhost;
-grant usage on *.* to mysqltest_2@localhost with grant option;
+grant create user on *.* to mysqltest_2@localhost;
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table 'user'
create user mysqltest_A@'%';
@@ -236,19 +237,17 @@ rename user mysqltest_A@'%' to mysqltest_B@'%';
drop user mysqltest_B@'%';
drop user mysqltest_2@localhost;
create user mysqltest_3@localhost;
-grant all privileges on mysql.* to mysqltest_3@localhost;
+grant INSERT,DELETE,UPDATE on mysql.* to mysqltest_3@localhost;
+show grants;
+Grants for mysqltest_3@localhost
+GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost'
+GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO 'mysqltest_3'@'localhost'
select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
-host user password
-% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
-localhost mysqltest_3
+ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user'
insert into mysql.user set host='%', user='mysqltest_B';
create user mysqltest_A@'%';
-ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql'
rename user mysqltest_B@'%' to mysqltest_C@'%';
-ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql'
-drop user mysqltest_B@'%';
-ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql'
-drop user mysqltest_B@'%';
+drop user mysqltest_C@'%';
drop user mysqltest_3@localhost;
set @@sql_mode='';
create database mysqltest_1;