Commit 06abeb4f authored by unknown's avatar unknown
Browse files

- Added new error message.

- Changed error message in sql_acl.cc
- Added some more tests for GRANT.


Docs/mysqld_error.txt:
  Added new error message.
mysql-test/r/grant2.result:
  Error message changed.
mysql-test/r/grant3.result:
  Clean up.
mysql-test/t/grant2.test:
  Error message changed.
sql/share/errmsg.txt:
  Added new error message.
sql/sql_acl.cc:
  Changed error message.
mysql-test/t/grant3.test:
  Error message changed.
parent 523a4217
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -595,3 +595,5 @@ character-set=latin1
"Invalid ON UPDATE clause for '%-.64s' field",
#define ER_UNSUPPORTED_PS 1295
"This command is not supported in the prepared statement protocol yet",
#define ER_CANT_CREATE_USER_WITH_GRANT 1296
"You are not allowed to create a user with GRANT"
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%'
GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%'
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
ERROR HY000: You are not allowed to create a user with GRANT
drop user 'mysqltest_1';
ERROR HY000: Operation DROP USER failed for 'mysqltest_1'@'%'
drop table t1, t2;
+17 −0
Original line number Diff line number Diff line
SET NAMES binary;
drop table if exists t1;
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
create user mysqltest_1@localhost;
grant grant option on mysql.* to mysqltest_1@localhost;
grant select on `my\_1`.* to mysqltest_1@localhost with grant option;
grant select on `my\_1`.* to mysqltest_2@localhost;
ERROR HY000: You are not allowed to create a user with GRANT
delete from mysql.user where user like 'mysqltest\_%';
delete from mysql.db where user like 'mysqltest\_%';
delete from mysql.tables_priv where user like 'mysqltest\_%';
delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
+1 −1
Original line number Diff line number Diff line
@@ -179,7 +179,7 @@ show grants for 'mysqltest_1';
drop user 'mysqltest_1', 'mysqltest_3';
#
# Grant must not create user
--error 1211
--error 1410
grant all on test.t1 to 'mysqltest_1';
--error 1396
drop user 'mysqltest_1';
+1 −0
Original line number Diff line number Diff line
--safe-user-create
Loading