Commit 92e9f24d authored by unknown's avatar unknown

Merge mysql.com:/home/mydev/mysql-5.0

into mysql.com:/home/mydev/mysql-5.0-wl2050-new

parents 31e9caa0 2c2333e5
...@@ -136,6 +136,10 @@ GRANT INSERT ON "test".* TO 'mysqltest_1'@'%' ...@@ -136,6 +136,10 @@ GRANT INSERT ON "test".* TO 'mysqltest_1'@'%'
GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%' GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%'
GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%' GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%'
drop user 'mysqltest_1', 'mysqltest_3'; drop user 'mysqltest_1', 'mysqltest_3';
grant all on test.t1 to 'mysqltest_1';
ERROR 42000: 'root'@'localhost' is not allowed to create new users
drop user 'mysqltest_1';
ERROR HY000: Operation DROP USER failed for 1 of the requested users
drop table t1, t2; drop table t1, t2;
insert into mysql.db set user='mysqltest_1', db='%', host='%'; insert into mysql.db set user='mysqltest_1', db='%', host='%';
flush privileges; flush privileges;
...@@ -197,7 +201,7 @@ GRANT SELECT ON "mysql".* TO '%@a'@'a' ...@@ -197,7 +201,7 @@ GRANT SELECT ON "mysql".* TO '%@a'@'a'
drop user '%@a'@'a'; drop user '%@a'@'a';
create user mysqltest_2@localhost; create user mysqltest_2@localhost;
grant usage on *.* to mysqltest_2@localhost with grant option; grant usage on *.* to mysqltest_2@localhost with grant option;
select host,user,password from mysql.user order by host,user,password; select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysql' ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'mysql'
create user mysqltest_A@'%'; create user mysqltest_A@'%';
rename user mysqltest_A@'%' to mysqltest_B@'%'; rename user mysqltest_A@'%' to mysqltest_B@'%';
...@@ -205,15 +209,10 @@ drop user mysqltest_B@'%'; ...@@ -205,15 +209,10 @@ drop user mysqltest_B@'%';
drop user mysqltest_2@localhost; drop user mysqltest_2@localhost;
create user mysqltest_3@localhost; create user mysqltest_3@localhost;
grant all privileges on mysql.* to mysqltest_3@localhost; grant all privileges on mysql.* to mysqltest_3@localhost;
select host,user,password from mysql.user order by host,user,password; select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
host user password host user password
% mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1 % mysqltest_2 *BD447CBA355AF58578D3AE33BA2E2CD388BA08D1
127.0.0.1 root
chilla%
chilla% root
localhost
localhost mysqltest_3 localhost mysqltest_3
localhost root
insert into mysql.user set host='%', user='mysqltest_B'; insert into mysql.user set host='%', user='mysqltest_B';
create user mysqltest_A@'%'; create user mysqltest_A@'%';
ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql' ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql'
......
...@@ -125,8 +125,10 @@ show grants for 'mysqltest_1'; ...@@ -125,8 +125,10 @@ show grants for 'mysqltest_1';
drop user 'mysqltest_1', 'mysqltest_3'; drop user 'mysqltest_1', 'mysqltest_3';
# #
# Grant must not create user # Grant must not create user
#grant all on test.t1 to 'mysqltest_1'; --error 1211
#drop user 'mysqltest_1'; grant all on test.t1 to 'mysqltest_1';
--error 1268
drop user 'mysqltest_1';
# #
# Cleanup # Cleanup
drop table t1, t2; drop table t1, t2;
...@@ -198,7 +200,7 @@ grant usage on *.* to mysqltest_2@localhost with grant option; ...@@ -198,7 +200,7 @@ grant usage on *.* to mysqltest_2@localhost with grant option;
connect (user2,localhost,mysqltest_2,,); connect (user2,localhost,mysqltest_2,,);
connection user2; connection user2;
--error 1044 --error 1044
select host,user,password from mysql.user order by host,user,password; select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password;
create user mysqltest_A@'%'; create user mysqltest_A@'%';
rename user mysqltest_A@'%' to mysqltest_B@'%'; rename user mysqltest_A@'%' to mysqltest_B@'%';
drop user mysqltest_B@'%'; drop user mysqltest_B@'%';
...@@ -211,7 +213,7 @@ create user mysqltest_3@localhost; ...@@ -211,7 +213,7 @@ create user mysqltest_3@localhost;
grant all privileges on mysql.* to mysqltest_3@localhost; grant all privileges on mysql.* to mysqltest_3@localhost;
connect (user3,localhost,mysqltest_3,,); connect (user3,localhost,mysqltest_3,,);
connection user3; connection user3;
select host,user,password from mysql.user order by host,user,password; 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'; insert into mysql.user set host='%', user='mysqltest_B';
--error 1044 --error 1044
create user mysqltest_A@'%'; create user mysqltest_A@'%';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment