diff options
Diffstat (limited to 'mysql-test')
101 files changed, 2083 insertions, 1938 deletions
diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result index 057105d192f..82007994eed 100644 --- a/mysql-test/main/connect.result +++ b/mysql-test/main/connect.result @@ -108,12 +108,12 @@ update mysql.user set password=old_password("gambling2") where user=_binary"test flush privileges; show grants for test@localhost; Grants for test@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY PASSWORD '2f27438961437573' +GRANT ALL PRIVILEGES ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573' update mysql.user set plugin='mysql_old_password' where user='test'; flush privileges; show grants for test@localhost; Grants for test@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY PASSWORD '2f27438961437573' +GRANT ALL PRIVILEGES ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573' connect con10,localhost,test,gambling2,; connect con5,localhost,test,gambling2,mysql; connection con5; diff --git a/mysql-test/main/events_bugs.result b/mysql-test/main/events_bugs.result index 4870c464fff..666361188b9 100644 --- a/mysql-test/main/events_bugs.result +++ b/mysql-test/main/events_bugs.result @@ -618,7 +618,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp USE test; SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION SET GLOBAL event_scheduler = ON; CREATE TABLE events_test.event_log @@ -632,9 +632,9 @@ GRANT create, insert, select, event ON events_test.* TO evtest1@localhost; GRANT select,insert ON test.* TO evtest1@localhost; SHOW GRANTS FOR evtest1@localhost; Grants for evtest1@localhost -GRANT USAGE ON *.* TO 'evtest1'@'localhost' IDENTIFIED BY PASSWORD '*3170F3644E31580C25DE4A08F4C07CC9A2D40C32' -GRANT SELECT, INSERT ON `test`.* TO 'evtest1'@'localhost' -GRANT SELECT, INSERT, CREATE, EVENT ON `events_test`.* TO 'evtest1'@'localhost' +GRANT USAGE ON *.* TO `evtest1`@`localhost` IDENTIFIED BY PASSWORD '*3170F3644E31580C25DE4A08F4C07CC9A2D40C32' +GRANT SELECT, INSERT ON `test`.* TO `evtest1`@`localhost` +GRANT SELECT, INSERT, CREATE, EVENT ON `events_test`.* TO `evtest1`@`localhost` connect e1,localhost,evtest1,ev1,events_test,$MASTER_MYPORT,$MASTER_MYSOCK; CREATE EVENT ev_sched_1823 ON SCHEDULE EVERY 2 SECOND DO BEGIN diff --git a/mysql-test/main/events_grant.result b/mysql-test/main/events_grant.result index c4f459dbe5b..5bdbbf0f8f1 100644 --- a/mysql-test/main/events_grant.result +++ b/mysql-test/main/events_grant.result @@ -23,9 +23,9 @@ USER() DATABASE() ev_test@localhost events_test2 SHOW GRANTS; Grants for ev_test@localhost -GRANT USAGE ON *.* TO 'ev_test'@'localhost' -GRANT ALL PRIVILEGES ON `events_test`.* TO 'ev_test'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER, DELETE HISTORY ON `events_test2`.* TO 'ev_test'@'localhost' +GRANT USAGE ON *.* TO `ev_test`@`localhost` +GRANT ALL PRIVILEGES ON `events_test`.* TO `ev_test`@`localhost` +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER, DELETE HISTORY ON `events_test2`.* TO `ev_test`@`localhost` "Here comes an error:"; SHOW EVENTS; ERROR 42000: Access denied for user 'ev_test'@'localhost' to database 'events_test2' diff --git a/mysql-test/main/fix_priv_tables.result b/mysql-test/main/fix_priv_tables.result index dea1ccdbd18..3f1830aadbc 100644 --- a/mysql-test/main/fix_priv_tables.result +++ b/mysql-test/main/fix_priv_tables.result @@ -10,25 +10,25 @@ SELECT * FROM testdb.t1; GRANT CREATE VIEW, SHOW VIEW ON testdb.v1 TO 'show_view_tbl'@'localhost'; SHOW GRANTS FOR 'show_view_tbl'@'localhost'; Grants for show_view_tbl@localhost -GRANT USAGE ON *.* TO 'show_view_tbl'@'localhost' -GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO 'show_view_tbl'@'localhost' +GRANT USAGE ON *.* TO `show_view_tbl`@`localhost` +GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO `show_view_tbl`@`localhost` GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost; SHOW GRANTS FOR 'select_only_c1'@'localhost'; Grants for select_only_c1@localhost -GRANT USAGE ON *.* TO 'select_only_c1'@'localhost' -GRANT SELECT (c1) ON `testdb`.`v1` TO 'select_only_c1'@'localhost' +GRANT USAGE ON *.* TO `select_only_c1`@`localhost` +GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost` "after fix privs" SHOW GRANTS FOR 'show_view_tbl'@'localhost'; Grants for show_view_tbl@localhost -GRANT USAGE ON *.* TO 'show_view_tbl'@'localhost' -GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO 'show_view_tbl'@'localhost' +GRANT USAGE ON *.* TO `show_view_tbl`@`localhost` +GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO `show_view_tbl`@`localhost` SHOW GRANTS FOR 'select_only_c1'@'localhost'; Grants for select_only_c1@localhost -GRANT USAGE ON *.* TO 'select_only_c1'@'localhost' -GRANT SELECT (c1) ON `testdb`.`v1` TO 'select_only_c1'@'localhost' +GRANT USAGE ON *.* TO `select_only_c1`@`localhost` +GRANT SELECT (c1) ON `testdb`.`v1` TO `select_only_c1`@`localhost` DROP USER 'show_view_tbl'@'localhost'; DROP USER 'select_only_c1'@'localhost'; diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result index ccbabab8019..d89afbc320c 100644 --- a/mysql-test/main/grant.result +++ b/mysql-test/main/grant.result @@ -13,8 +13,8 @@ flush privileges; grant select on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA"; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` grant delete on mysqltest.* to mysqltest_1@localhost; select * from mysql.user where user="mysqltest_1"; Host localhost @@ -66,27 +66,27 @@ default_role max_statement_time 0.000000 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT, DELETE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT, DELETE ON `mysqltest`.* TO `mysqltest_1`@`localhost` revoke delete on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` REQUIRE CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` grant select on mysqltest.* to mysqltest_1@localhost require NONE; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` grant USAGE on mysqltest.* to mysqltest_1@localhost require cipher "EDH-RSA-DES-CBC3-SHA" AND SUBJECT "testsubject" ISSUER "Monty Program Ab"; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'Monty Program Ab' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` REQUIRE ISSUER 'Monty Program Ab' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` revoke all privileges on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'Monty Program Ab' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` REQUIRE ISSUER 'Monty Program Ab' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA' delete from mysql.user where user='mysqltest_1'; flush privileges; delete from mysql.user where user='mysqltest_1'; @@ -142,7 +142,7 @@ default_role max_statement_time 60.000000 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_STATEMENT_TIME 60.000000 +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` WITH MAX_QUERIES_PER_HOUR 10 MAX_STATEMENT_TIME 60.000000 grant usage on *.* to mysqltest_1@localhost with max_updates_per_hour 20 max_connections_per_hour 30 max_statement_time 0; select * from mysql.user where user="mysqltest_1"; Host localhost @@ -194,48 +194,48 @@ default_role max_statement_time 0.000000 show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 flush privileges; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 delete from mysql.user where user='mysqltest_1'; flush privileges; grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO `mysqltest_1`@`localhost` flush privileges; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO `mysqltest_1`@`localhost` revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT LOCK TABLES ON `mysqltest`.* TO `mysqltest_1`@`localhost` grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION; flush privileges; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `mysqltest`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION revoke all privileges on mysqltest.* from mysqltest_1@localhost; delete from mysql.user where user='mysqltest_1'; flush privileges; grant usage on test.* to mysqltest_1@localhost with grant option; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT USAGE ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION -GRANT USAGE ON `test`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT USAGE ON `mysqltest`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION +GRANT USAGE ON `test`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION delete from mysql.user where user='mysqltest_1'; delete from mysql.db where user='mysqltest_1'; delete from mysql.tables_priv where user='mysqltest_1'; @@ -248,21 +248,21 @@ GRANT select,update,insert on t1 to mysqltest_1@localhost; GRANT select (a), update (a),insert(a), references(a) on t1 to mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, SELECT (a), INSERT, INSERT (a), UPDATE, UPDATE (a), REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost` select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; table_priv column_priv Select,Insert,Update Select,Insert,Update,References REVOKE select (a), update on t1 from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, INSERT, INSERT (a), REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost` REVOKE select,update,insert,insert (a) on t1 from mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT REFERENCES (a) ON `test`.`t1` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT REFERENCES (a) ON `test`.`t1` TO `mysqltest_1`@`localhost` GRANT select,references on t1 to mysqltest_1@localhost; select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; table_priv column_priv @@ -271,22 +271,22 @@ grant all on test.* to mysqltest_3@localhost with grant option; revoke all on test.* from mysqltest_3@localhost; show grants for mysqltest_3@localhost; Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -GRANT USAGE ON `test`.* TO 'mysqltest_3'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_3`@`localhost` +GRANT USAGE ON `test`.* TO `mysqltest_3`@`localhost` WITH GRANT OPTION revoke grant option on test.* from mysqltest_3@localhost; show grants for mysqltest_3@localhost; Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_3`@`localhost` grant all on test.t1 to mysqltest_2@localhost with grant option; revoke all on test.t1 from mysqltest_2@localhost; show grants for mysqltest_2@localhost; Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -GRANT USAGE ON `test`.`t1` TO 'mysqltest_2'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_2`@`localhost` +GRANT USAGE ON `test`.`t1` TO `mysqltest_2`@`localhost` WITH GRANT OPTION revoke grant option on test.t1 from mysqltest_2@localhost; show grants for mysqltest_2@localhost; Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_2`@`localhost` delete from mysql.user where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; delete from mysql.db where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; delete from mysql.tables_priv where user='mysqltest_1' or user="mysqltest_2" or user="mysqltest_3"; @@ -310,16 +310,16 @@ alter table mysql.db order by db asc; flush privileges; show grants for test11@localhost; Grants for test11@localhost -GRANT USAGE ON *.* TO 'test11'@'localhost' -GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' -GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +GRANT USAGE ON *.* TO `test11`@`localhost` +GRANT SELECT ON `ab%`.* TO `test11`@`localhost` +GRANT SELECT ON `a%`.* TO `test11`@`localhost` alter table mysql.db order by db desc; flush privileges; show grants for test11@localhost; Grants for test11@localhost -GRANT USAGE ON *.* TO 'test11'@'localhost' -GRANT SELECT ON `ab%`.* TO 'test11'@'localhost' -GRANT SELECT ON `a%`.* TO 'test11'@'localhost' +GRANT USAGE ON *.* TO `test11`@`localhost` +GRANT SELECT ON `ab%`.* TO `test11`@`localhost` +GRANT SELECT ON `a%`.* TO `test11`@`localhost` delete from mysql.user where user='test11'; delete from mysql.db where user='test11'; create database mysqltest1; @@ -332,7 +332,7 @@ create table t1 (a int); grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION; show grants for drop_user2@localhost; Grants for drop_user2@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user2'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `drop_user2`@`localhost` WITH GRANT OPTION revoke all privileges, grant option from drop_user2@localhost; drop user drop_user2@localhost; grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION; @@ -340,44 +340,44 @@ grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION; grant select(a) on test.t1 to drop_user@localhost; show grants for drop_user@localhost; Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION +GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION +GRANT SELECT (a) ON `test`.`t1` TO `drop_user`@`localhost` set sql_mode=ansi_quotes; show grants for drop_user@localhost; Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION +GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION +GRANT SELECT (a) ON "test"."t1" TO "drop_user"@"localhost" set sql_mode=default; set sql_quote_show_create=0; show grants for drop_user@localhost; Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO drop_user@localhost WITH GRANT OPTION +GRANT ALL PRIVILEGES ON test.* TO drop_user@localhost WITH GRANT OPTION +GRANT SELECT (a) ON test.t1 TO drop_user@localhost set sql_mode="ansi_quotes"; show grants for drop_user@localhost; Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON test.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON test.t1 TO 'drop_user'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO drop_user@localhost WITH GRANT OPTION +GRANT ALL PRIVILEGES ON test.* TO drop_user@localhost WITH GRANT OPTION +GRANT SELECT (a) ON test.t1 TO drop_user@localhost set sql_quote_show_create=1; show grants for drop_user@localhost; Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON "test".* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON "test"."t1" TO 'drop_user'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO "drop_user"@"localhost" WITH GRANT OPTION +GRANT ALL PRIVILEGES ON "test".* TO "drop_user"@"localhost" WITH GRANT OPTION +GRANT SELECT (a) ON "test"."t1" TO "drop_user"@"localhost" set sql_mode=""; show grants for drop_user@localhost; Grants for drop_user@localhost -GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION -GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO `drop_user`@`localhost` WITH GRANT OPTION +GRANT ALL PRIVILEGES ON `test`.* TO `drop_user`@`localhost` WITH GRANT OPTION +GRANT SELECT (a) ON `test`.`t1` TO `drop_user`@`localhost` revoke all privileges, grant option from drop_user@localhost; show grants for drop_user@localhost; Grants for drop_user@localhost -GRANT USAGE ON *.* TO 'drop_user'@'localhost' +GRANT USAGE ON *.* TO `drop_user`@`localhost` drop user drop_user@localhost; revoke all privileges, grant option from drop_user@localhost; ERROR HY000: Can't revoke all privileges for one or more of the requested users @@ -398,8 +398,8 @@ grant usage on *.* to mysqltest_1@localhost identified by "password"; grant select, update, insert on test.* to mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' -GRANT SELECT, INSERT, UPDATE ON `test`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' +GRANT SELECT, INSERT, UPDATE ON `test`.* TO `mysqltest_1`@`localhost` drop user mysqltest_1@localhost; SET NAMES koi8r; CREATE DATABASE ÂÄ; @@ -408,20 +408,20 @@ CREATE TABLE ÔÁÂ (ËÏÌ INT); GRANT SELECT ON ÂÄ.* TO ÀÚÅÒ@localhost; SHOW GRANTS FOR ÀÚÅÒ@localhost; Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.* TO 'ÀÚÅÒ'@'localhost' +GRANT USAGE ON *.* TO `ÀÚÅÒ`@`localhost` +GRANT SELECT ON `ÂÄ`.* TO `ÀÚÅÒ`@`localhost` REVOKE SELECT ON ÂÄ.* FROM ÀÚÅÒ@localhost; GRANT SELECT ON ÂÄ.ÔÁÂ TO ÀÚÅÒ@localhost; SHOW GRANTS FOR ÀÚÅÒ@localhost; Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' +GRANT USAGE ON *.* TO `ÀÚÅÒ`@`localhost` +GRANT SELECT ON `ÂÄ`.`ÔÁÂ` TO `ÀÚÅÒ`@`localhost` REVOKE SELECT ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost; GRANT SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ TO ÀÚÅÒ@localhost; SHOW GRANTS FOR ÀÚÅÒ@localhost; Grants for ÀÚÅÒ@localhost -GRANT USAGE ON *.* TO 'ÀÚÅÒ'@'localhost' -GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO 'ÀÚÅÒ'@'localhost' +GRANT USAGE ON *.* TO `ÀÚÅÒ`@`localhost` +GRANT SELECT (ËÏÌ) ON `ÂÄ`.`ÔÁÂ` TO `ÀÚÅÒ`@`localhost` REVOKE SELECT (ËÏÌ) ON ÂÄ.ÔÁÂ FROM ÀÚÅÒ@localhost; DROP USER ÀÚÅÒ@localhost; DROP DATABASE ÂÄ; @@ -480,7 +480,7 @@ GRANT SELECT (a) ON test.t10 TO testuser@localhost; REVOKE ALL PRIVILEGES, GRANT OPTION FROM testuser@localhost; SHOW GRANTS FOR testuser@localhost; Grants for testuser@localhost -GRANT USAGE ON *.* TO 'testuser'@'localhost' +GRANT USAGE ON *.* TO `testuser`@`localhost` DROP USER testuser@localhost; DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; DROP DATABASE testdb1; @@ -497,8 +497,8 @@ create table t1(a int, b int, c int, d int); grant insert(b), insert(c), insert(d), insert(a) on t1 to grant_user@localhost; show grants for grant_user@localhost; Grants for grant_user@localhost -GRANT USAGE ON *.* TO 'grant_user'@'localhost' -GRANT INSERT (a, d, c, b) ON `test`.`t1` TO 'grant_user'@'localhost' +GRANT USAGE ON *.* TO `grant_user`@`localhost` +GRANT INSERT (a, d, c, b) ON `test`.`t1` TO `grant_user`@`localhost` select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv order by Column_name; Host Db User Table_name Column_name Column_priv localhost test grant_user t1 a Insert @@ -508,7 +508,7 @@ localhost test grant_user t1 d Insert revoke ALL PRIVILEGES on t1 from grant_user@localhost; show grants for grant_user@localhost; Grants for grant_user@localhost -GRANT USAGE ON *.* TO 'grant_user'@'localhost' +GRANT USAGE ON *.* TO `grant_user`@`localhost` select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv; Host Db User Table_name Column_name Column_priv drop user grant_user@localhost; @@ -660,9 +660,9 @@ GRANT ALL PRIVILEGES ON mysqltest.dummytable TO dummy@localhost; GRANT ALL PRIVILEGES ON mysqltest.dummyview TO dummy@localhost; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO 'dummy'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +GRANT USAGE ON *.* TO `dummy`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO `dummy`@`localhost` use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE @@ -673,9 +673,9 @@ mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DELETE HISTORY, DROP, IN FLUSH PRIVILEGES; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO 'dummy'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +GRANT USAGE ON *.* TO `dummy`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO `dummy`@`localhost` SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; @@ -704,9 +704,9 @@ GRANT CREATE VIEW ON mysqltest.dummytable TO dummy@localhost; GRANT CREATE VIEW ON mysqltest.dummyview TO dummy@localhost; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO 'dummy'@'localhost' -GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' -GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +GRANT USAGE ON *.* TO `dummy`@`localhost` +GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE @@ -717,9 +717,9 @@ mysqltest dummyview CREATE VIEW FLUSH PRIVILEGES; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO 'dummy'@'localhost' -GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' -GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +GRANT USAGE ON *.* TO `dummy`@`localhost` +GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; @@ -738,9 +738,9 @@ GRANT SHOW VIEW ON mysqltest.dummytable TO dummy@localhost; GRANT SHOW VIEW ON mysqltest.dummyview TO dummy@localhost; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO 'dummy'@'localhost' -GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' -GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +GRANT USAGE ON *.* TO `dummy`@`localhost` +GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE @@ -751,9 +751,9 @@ mysqltest dummyview SHOW VIEW FLUSH PRIVILEGES; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO 'dummy'@'localhost' -GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO 'dummy'@'localhost' -GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO 'dummy'@'localhost' +GRANT USAGE ON *.* TO `dummy`@`localhost` +GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; @@ -782,27 +782,27 @@ hex(Db) D0B1D0B4 show grants for root@localhost; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `ÂÄ`.* TO 'root'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `ÂÄ`.* TO `root`@`localhost` GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION flush privileges; show grants for root@localhost; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `ÂÄ`.* TO 'root'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `ÂÄ`.* TO `root`@`localhost` GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop database ÂÄ; revoke all privileges on ÂÄ.* from root@localhost; show grants for root@localhost; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION set names latin1; create user mysqltest_7@; set password for mysqltest_7@ = password('systpass'); show grants for mysqltest_7@; Grants for mysqltest_7@% -GRANT USAGE ON *.* TO 'mysqltest_7'@'%' IDENTIFIED BY PASSWORD '*2FB071A056F9BB745219D9C876814231DAF46517' +GRANT USAGE ON *.* TO `mysqltest_7`@`%` IDENTIFIED BY PASSWORD '*2FB071A056F9BB745219D9C876814231DAF46517' drop user mysqltest_7@; show grants for mysqltest_7@; ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host '%' @@ -813,12 +813,12 @@ GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%'; GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%'; show grants for mysqltest1@'192.%'; Grants for mysqltest1@192.% -GRANT USAGE ON *.* TO 'mysqltest1'@'192.%' -GRANT SELECT ON `mysqltest`.`t1` TO 'mysqltest1'@'192.%' +GRANT USAGE ON *.* TO `mysqltest1`@`192.%` +GRANT SELECT ON `mysqltest`.`t1` TO `mysqltest1`@`192.%` show grants for mysqltest1@'%'; Grants for mysqltest1@% -GRANT USAGE ON *.* TO 'mysqltest1'@'%' -GRANT DELETE ON `mysqltest`.`t1` TO 'mysqltest1'@'%' +GRANT USAGE ON *.* TO `mysqltest1`@`%` +GRANT DELETE ON `mysqltest`.`t1` TO `mysqltest1`@`%` delete from mysql.user where user='mysqltest1'; delete from mysql.db where user='mysqltest1'; delete from mysql.tables_priv where user='mysqltest1'; @@ -861,18 +861,18 @@ Schema privileges grant select on mysqltest.* to mysqltest_8@''; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_8`@`%` grant select on mysqltest.* to mysqltest_8@; show grants for mysqltest_8@; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_8`@`%` grant select on mysqltest.* to mysqltest_8; show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_8`@`%` select * from information_schema.schema_privileges where grantee like "'mysqltest_8'%"; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE @@ -885,26 +885,26 @@ connection master; revoke select on mysqltest.* from mysqltest_8@''; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` select * from information_schema.schema_privileges where grantee like "'mysqltest_8'%"; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE flush privileges; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` show grants for mysqltest_8@; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` grant select on mysqltest.* to mysqltest_8@''; flush privileges; show grants for mysqltest_8@; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_8`@`%` revoke select on mysqltest.* from mysqltest_8@''; flush privileges; Column privileges @@ -912,21 +912,21 @@ grant update (a) on t1 to mysqltest_8@''; grant update (a) on t1 to mysqltest_8; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` flush privileges; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` select * from information_schema.column_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'%' def test t1 a UPDATE NO @@ -938,39 +938,39 @@ connection master; revoke update (a) on t1 from mysqltest_8@''; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` select * from information_schema.column_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE flush privileges; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` Table privileges grant update on t1 to mysqltest_8@''; grant update on t1 to mysqltest_8; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE ON `test`.`t1` TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE ON `test`.`t1` TO `mysqltest_8`@`%` flush privileges; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE ON `test`.`t1` TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT UPDATE ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT UPDATE ON `test`.`t1` TO `mysqltest_8`@`%` select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'%' def test t1 UPDATE NO @@ -982,19 +982,19 @@ connection master; revoke update on t1 from mysqltest_8@''; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE flush privileges; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` "DROP USER" should clear privileges grant all privileges on mysqltest.* to mysqltest_8@''; grant select on mysqltest.* to mysqltest_8@''; @@ -1003,14 +1003,14 @@ grant update (a) on t1 to mysqltest_8@''; grant all privileges on mysqltest.* to mysqltest_8; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' -GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%` +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' -GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%` +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` select * from information_schema.user_privileges where grantee like "'mysqltest_8'%"; GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE @@ -1024,14 +1024,14 @@ connection master; flush privileges; show grants for mysqltest_8@''; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' -GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%` +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` show grants for mysqltest_8; Grants for mysqltest_8@% -GRANT USAGE ON *.* TO 'mysqltest_8'@'%' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_8'@'%' -GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO 'mysqltest_8'@'%' +GRANT USAGE ON *.* TO `mysqltest_8`@`%` +GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_8`@`%` +GRANT UPDATE, UPDATE (a) ON `test`.`t1` TO `mysqltest_8`@`%` drop user mysqltest_8@''; show grants for mysqltest_8@''; ERROR 42000: There is no such grant defined for user 'mysqltest_8' on host '%' @@ -1149,8 +1149,8 @@ USER() mysqltest_1@localhost SHOW GRANTS; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost` RENAME TABLE t1 TO t2; ERROR 42000: DROP, ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' ALTER TABLE t1 RENAME TO t2; @@ -1169,8 +1169,8 @@ GRANT ALTER ON mysqltest1.t1 TO mysqltest_1@localhost; connect conn42,localhost,mysqltest_1,,mysqltest1; SHOW GRANTS; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, DROP, ALTER ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost` RENAME TABLE t1 TO t2; ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2' ALTER TABLE t1 RENAME TO t2; @@ -1181,8 +1181,8 @@ GRANT INSERT, CREATE ON mysqltest1.t1 TO mysqltest_1@localhost; connect conn42,localhost,mysqltest_1,,mysqltest1; SHOW GRANTS; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost` disconnect conn42; connection default; GRANT INSERT, SELECT, CREATE, ALTER, DROP ON mysqltest1.t2 TO mysqltest_1@localhost; @@ -1190,9 +1190,9 @@ DROP TABLE mysqltest1.t2; connect conn42,localhost,mysqltest_1,,mysqltest1; SHOW GRANTS; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost` +GRANT SELECT, INSERT, CREATE, DROP, ALTER ON `mysqltest1`.`t2` TO `mysqltest_1`@`localhost` RENAME TABLE t1 TO t2; RENAME TABLE t2 TO t1; ALTER TABLE t1 RENAME TO t2; @@ -1204,9 +1204,9 @@ REVOKE DROP, INSERT ON mysqltest1.t2 FROM mysqltest_1@localhost; connect conn42,localhost,mysqltest_1,,mysqltest1; SHOW GRANTS; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t1` TO 'mysqltest_1'@'localhost' -GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t2` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t1` TO `mysqltest_1`@`localhost` +GRANT SELECT, CREATE, ALTER ON `mysqltest1`.`t2` TO `mysqltest_1`@`localhost` RENAME TABLE t1 TO t2; ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' ALTER TABLE t1 RENAME TO t2; @@ -1541,9 +1541,9 @@ grant execute on procedure mysqltest1.p1 to mysqluser1@localhost; # in privilege tables and in in-memory structures. show grants for mysqluser1@localhost; Grants for mysqluser1@localhost -GRANT USAGE ON *.* TO 'mysqluser1'@'localhost' -GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO 'mysqluser1'@'localhost' -GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO 'mysqluser1'@'localhost' +GRANT USAGE ON *.* TO `mysqluser1`@`localhost` +GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO `mysqluser1`@`localhost` +GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO `mysqluser1`@`localhost` select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost'; db routine_name routine_type proc_priv mysqltest1 f1 FUNCTION Execute @@ -1574,7 +1574,7 @@ connection default; create user mysqluser1@localhost; show grants for mysqluser1@localhost; Grants for mysqluser1@localhost -GRANT USAGE ON *.* TO 'mysqluser1'@'localhost' +GRANT USAGE ON *.* TO `mysqluser1`@`localhost` select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost'; db routine_name routine_type proc_priv connect bug36544_con2,localhost,mysqluser1,,; @@ -1608,11 +1608,11 @@ grant select on mysqltest1.t11 to mysqluser1@localhost; # in privilege tables and in in-memory structures. show grants for mysqluser1@localhost; Grants for mysqluser1@localhost -GRANT USAGE ON *.* TO 'mysqluser1'@'localhost' -GRANT SELECT ON `mysqltest1`.`t11` TO 'mysqluser1'@'localhost' -GRANT SELECT ON `mysqltest1`.`t22` TO 'mysqluser1'@'localhost' -GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO 'mysqluser1'@'localhost' -GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO 'mysqluser1'@'localhost' +GRANT USAGE ON *.* TO `mysqluser1`@`localhost` +GRANT SELECT ON `mysqltest1`.`t11` TO `mysqluser1`@`localhost` +GRANT SELECT ON `mysqltest1`.`t22` TO `mysqluser1`@`localhost` +GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO `mysqluser1`@`localhost` +GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO `mysqluser1`@`localhost` select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost'; db routine_name routine_type proc_priv mysqltest1 f1 FUNCTION Execute @@ -1654,7 +1654,7 @@ connection default; create user mysqluser1@localhost; show grants for mysqluser1@localhost; Grants for mysqluser1@localhost -GRANT USAGE ON *.* TO 'mysqluser1'@'localhost' +GRANT USAGE ON *.* TO `mysqluser1`@`localhost` select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost'; db routine_name routine_type proc_priv select db, table_name, table_priv from mysql.tables_priv where user='mysqluser1' and host='localhost'; @@ -1678,11 +1678,11 @@ connection default; # show grants for mysqluser10@localhost; Grants for mysqluser10@localhost -GRANT USAGE ON *.* TO 'mysqluser10'@'localhost' -GRANT SELECT ON `mysqltest1`.`t11` TO 'mysqluser10'@'localhost' -GRANT SELECT ON `mysqltest1`.`t22` TO 'mysqluser10'@'localhost' -GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO 'mysqluser10'@'localhost' -GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO 'mysqluser10'@'localhost' +GRANT USAGE ON *.* TO `mysqluser10`@`localhost` +GRANT SELECT ON `mysqltest1`.`t11` TO `mysqluser10`@`localhost` +GRANT SELECT ON `mysqltest1`.`t22` TO `mysqluser10`@`localhost` +GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO `mysqluser10`@`localhost` +GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO `mysqluser10`@`localhost` select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser10' and host='localhost'; db routine_name routine_type proc_priv mysqltest1 f1 FUNCTION Execute @@ -1822,8 +1822,8 @@ GRANT CREATE ROUTINE ON db1.* TO 'user2'@'%'; FLUSH PRIVILEGES; SHOW GRANTS FOR 'user1'@'localhost'; Grants for user1@localhost -GRANT USAGE ON *.* TO 'user1'@'localhost' -GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user1'@'localhost' +GRANT USAGE ON *.* TO `user1`@`localhost` +GRANT CREATE, CREATE ROUTINE ON `db1`.* TO `user1`@`localhost` connect con1,localhost,user1,,; ** Connect as user1 and create a procedure. ** The creation will imply implicitly assigned @@ -1854,14 +1854,14 @@ END ;|| connection default; SHOW GRANTS FOR 'user1'@'localhost'; Grants for user1@localhost -GRANT USAGE ON *.* TO 'user1'@'localhost' -GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user1'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `db1`.`proc1` TO 'user1'@'localhost' +GRANT USAGE ON *.* TO `user1`@`localhost` +GRANT CREATE, CREATE ROUTINE ON `db1`.* TO `user1`@`localhost` +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `db1`.`proc1` TO `user1`@`localhost` SHOW GRANTS FOR 'user2'; Grants for user2@% -GRANT USAGE ON *.* TO 'user2'@'%' -GRANT CREATE, CREATE ROUTINE ON `db1`.* TO 'user2'@'%' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `db1`.`proc2` TO 'user2'@'%' +GRANT USAGE ON *.* TO `user2`@`%` +GRANT CREATE, CREATE ROUTINE ON `db1`.* TO `user2`@`%` +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `db1`.`proc2` TO `user2`@`%` disconnect con1; disconnect con2; DROP PROCEDURE db1.proc1; @@ -1882,19 +1882,19 @@ ERROR 3D000: No database selected GRANT ALL ON *.* TO mysqltest_1; SHOW GRANTS FOR mysqltest_1; Grants for mysqltest_1@% -GRANT ALL PRIVILEGES ON *.* TO 'mysqltest_1'@'%' +GRANT ALL PRIVILEGES ON *.* TO `mysqltest_1`@`%` DROP USER mysqltest_1; USE test; GRANT ALL ON * TO mysqltest_1; SHOW GRANTS FOR mysqltest_1; Grants for mysqltest_1@% -GRANT USAGE ON *.* TO 'mysqltest_1'@'%' -GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'%' +GRANT USAGE ON *.* TO `mysqltest_1`@`%` +GRANT ALL PRIVILEGES ON `test`.* TO `mysqltest_1`@`%` DROP USER mysqltest_1; GRANT ALL ON *.* TO mysqltest_1; SHOW GRANTS FOR mysqltest_1; Grants for mysqltest_1@% -GRANT ALL PRIVILEGES ON *.* TO 'mysqltest_1'@'%' +GRANT ALL PRIVILEGES ON *.* TO `mysqltest_1`@`%` DROP USER mysqltest_1; connection default; disconnect conn1; @@ -1967,8 +1967,8 @@ GRANT USAGE ON *.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT RELOAD, SHUTDOWN, PROCESS, FILE, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT, CREATE USER ON *.* TO 'mysqltest_u1'@'localhost' -GRANT CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT RELOAD, SHUTDOWN, PROCESS, FILE, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT, CREATE USER ON *.* TO `mysqltest_u1`@`localhost` +GRANT CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE, EVENT ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -1980,7 +1980,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global SELECT allows SHOW CREATE TABLE. @@ -1990,8 +1990,8 @@ GRANT SELECT ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT SELECT ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT SELECT ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2006,7 +2006,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global INSERT allows SHOW CREATE TABLE. @@ -2016,8 +2016,8 @@ GRANT INSERT ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT INSERT ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT INSERT ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2032,7 +2032,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global UPDATE allows SHOW CREATE TABLE. @@ -2042,8 +2042,8 @@ GRANT UPDATE ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT UPDATE ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT UPDATE ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2058,7 +2058,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global DELETE allows SHOW CREATE TABLE. @@ -2068,8 +2068,8 @@ GRANT DELETE ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT DELETE ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT DELETE ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2084,7 +2084,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global CREATE allows SHOW CREATE TABLE. @@ -2094,8 +2094,8 @@ GRANT CREATE ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT CREATE ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT CREATE ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2110,7 +2110,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global DROP allows SHOW CREATE TABLE. @@ -2120,8 +2120,8 @@ GRANT DROP ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT DROP ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT DROP ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2136,7 +2136,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global ALTER allows SHOW CREATE TABLE. @@ -2146,8 +2146,8 @@ GRANT ALTER ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT ALTER ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT ALTER ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2162,7 +2162,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global INDEX allows SHOW CREATE TABLE. @@ -2172,8 +2172,8 @@ GRANT INDEX ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT INDEX ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT INDEX ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2188,7 +2188,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global REFERENCES allows SHOW CREATE TABLE. @@ -2198,8 +2198,8 @@ GRANT REFERENCES ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT REFERENCES ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT REFERENCES ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2214,7 +2214,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global GRANT OPTION allows SHOW CREATE TABLE. @@ -2224,8 +2224,8 @@ GRANT GRANT OPTION ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT USAGE ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT USAGE ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` WITH GRANT OPTION connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2240,7 +2240,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global CREATE VIEW allows SHOW CREATE TABLE. @@ -2250,8 +2250,8 @@ GRANT CREATE VIEW ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT CREATE VIEW ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT CREATE VIEW ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2266,7 +2266,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that global SHOW VIEW allows SHOW CREATE TABLE. @@ -2276,8 +2276,8 @@ GRANT SHOW VIEW ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT SHOW VIEW ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT SHOW VIEW ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2292,7 +2292,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level SELECT allows SHOW CREATE TABLE. @@ -2302,8 +2302,8 @@ GRANT SELECT ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT SELECT ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT SELECT ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2318,7 +2318,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level INSERT allows SHOW CREATE TABLE. @@ -2328,8 +2328,8 @@ GRANT INSERT ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT INSERT ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT INSERT ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2344,7 +2344,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level UPDATE allows SHOW CREATE TABLE. @@ -2354,8 +2354,8 @@ GRANT UPDATE ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT UPDATE ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT UPDATE ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2370,7 +2370,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level DELETE allows SHOW CREATE TABLE. @@ -2380,8 +2380,8 @@ GRANT DELETE ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT DELETE ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT DELETE ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2396,7 +2396,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level CREATE allows SHOW CREATE TABLE. @@ -2406,8 +2406,8 @@ GRANT CREATE ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT CREATE ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT CREATE ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2422,7 +2422,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level DROP allows SHOW CREATE TABLE. @@ -2432,8 +2432,8 @@ GRANT DROP ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT DROP ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT DROP ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2448,7 +2448,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level ALTER allows SHOW CREATE TABLE. @@ -2458,8 +2458,8 @@ GRANT ALTER ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT ALTER ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT ALTER ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2474,7 +2474,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level INDEX allows SHOW CREATE TABLE. @@ -2484,8 +2484,8 @@ GRANT INDEX ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT INDEX ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT INDEX ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2500,7 +2500,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level REFERENCES allows SHOW CREATE TABLE. @@ -2510,8 +2510,8 @@ GRANT REFERENCES ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT REFERENCES ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT REFERENCES ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2526,7 +2526,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level GRANT OPTION allows SHOW CREATE TABLE. @@ -2536,8 +2536,8 @@ GRANT GRANT OPTION ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT USAGE ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT USAGE ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` WITH GRANT OPTION connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2552,7 +2552,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level CREATE VIEW allows SHOW CREATE TABLE. @@ -2562,8 +2562,8 @@ GRANT CREATE VIEW ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT CREATE VIEW ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT CREATE VIEW ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2578,7 +2578,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Check that table-level SHOW VIEW allows SHOW CREATE TABLE. @@ -2588,8 +2588,8 @@ GRANT SHOW VIEW ON mysqltest_db1.t1 TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT SHOW VIEW ON `mysqltest_db1`.`t1` TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT SHOW VIEW ON `mysqltest_db1`.`t1` TO `mysqltest_u1`@`localhost` connect con1,localhost,mysqltest_u1,,mysqltest_db1; connection con1; @@ -2604,7 +2604,7 @@ disconnect con1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` # -- # -- Cleanup. @@ -2634,7 +2634,7 @@ grant select on mysqltest_db1.t1 to mysqltest_u1; ERROR 42S02: Table 'mysqltest_db1.t1' doesn't exist show grants for mysqltest_u1; Grants for mysqltest_u1@% -GRANT USAGE ON *.* TO 'mysqltest_u1'@'%' +GRANT USAGE ON *.* TO `mysqltest_u1`@`%` drop database mysqltest_db1; drop user mysqltest_u1; # @@ -2677,28 +2677,28 @@ connect con1,localhost,foo; create procedure fooproc() select 'i am fooproc'; show grants; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT CREATE ROUTINE ON `foodb`.* TO `foo`@`localhost` +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO `foo`@`localhost` disconnect con1; connection default; rename table mysql.procs_priv to mysql.procs_priv1; flush privileges; show grants for foo@localhost; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT CREATE ROUTINE ON `foodb`.* TO `foo`@`localhost` rename table mysql.procs_priv1 to mysql.procs_priv; show grants for foo@localhost; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT CREATE ROUTINE ON `foodb`.* TO `foo`@`localhost` flush privileges; show grants for foo@localhost; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT CREATE ROUTINE ON `foodb`.* TO `foo`@`localhost` +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO `foo`@`localhost` drop user foo@localhost; drop procedure fooproc; drop database foodb; @@ -2713,7 +2713,7 @@ GRANT USAGE ON *.* TO untrusted@localhost; connect con1, localhost, untrusted; SHOW GRANTS; Grants for untrusted@localhost -GRANT USAGE ON *.* TO 'untrusted'@'localhost' +GRANT USAGE ON *.* TO `untrusted`@`localhost` SHOW DATABASES; Database information_schema @@ -2779,11 +2779,11 @@ CREATE USER ten2; GRANT ALL ON *.* TO ten2; SHOW GRANTS FOR ten2; Grants for ten2@% -GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%' +GRANT ALL PRIVILEGES ON *.* TO `ten2`@`%` FLUSH PRIVILEGES; SHOW GRANTS FOR ten2; Grants for ten2@% -GRANT ALL PRIVILEGES ON *.* TO 'ten2'@'%' +GRANT ALL PRIVILEGES ON *.* TO `ten2`@`%` DROP USER ten2; ALTER TABLE mysql.user ADD Delete_history_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL DEFAULT 'N' after Create_tablespace_priv; UPDATE mysql.user SET Delete_history_priv = Super_priv WHERE @had_user_delete_history_priv = 1; diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result index ffb41c1b5f8..022b94d641b 100644 --- a/mysql-test/main/grant2.result +++ b/mysql-test/main/grant2.result @@ -59,12 +59,12 @@ disconnect user1; connection default; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT CREATE USER ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `my\_%`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +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; Grants for mysqltest_2@localhost -GRANT USAGE ON *.* TO 'mysqltest_2'@'localhost' -GRANT ALL PRIVILEGES ON `my\_1`.* TO 'mysqltest_2'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_2`@`localhost` +GRANT ALL PRIVILEGES ON `my\_1`.* TO `mysqltest_2`@`localhost` WITH GRANT OPTION show grants for mysqltest_3@localhost; ERROR 42000: There is no such grant defined for user 'mysqltest_3' on host 'localhost' delete from mysql.user where user like 'mysqltest\_%'; @@ -88,8 +88,8 @@ disconnect user2; connection default; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest\_1`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest\_1`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION delete from mysql.user where user like 'mysqltest\_%'; delete from mysql.db where user like 'mysqltest\_%'; drop database mysqltest_1; @@ -103,8 +103,8 @@ connect mrbad, localhost, mysqltest_1,,mysqltest; connection mrbad; show grants for current_user(); Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, INSERT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, INSERT ON `mysqltest`.* TO `mysqltest_1`@`localhost` insert into t1 values (1, 'I can''t change it!'); update t1 set data='I can change it!' where id = 1; ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for table 't1' @@ -198,13 +198,13 @@ host db user table_name column_name % test mysqltest_2 t2 c2 show grants for 'mysqltest_1'; Grants for mysqltest_1@% -GRANT USAGE ON *.* TO 'mysqltest_1'@'%' +GRANT USAGE ON *.* TO "mysqltest_1"@"%" show grants for 'mysqltest_2'; Grants for mysqltest_2@% -GRANT SELECT ON *.* TO 'mysqltest_2'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' -GRANT INSERT ON "test".* TO 'mysqltest_2'@'%' -GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_2'@'%' -GRANT UPDATE ON "test"."t1" TO 'mysqltest_2'@'%' +GRANT SELECT ON *.* TO "mysqltest_2"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' +GRANT INSERT ON "test".* TO "mysqltest_2"@"%" +GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_2"@"%" +GRANT UPDATE ON "test"."t1" TO "mysqltest_2"@"%" drop user 'mysqltest_1'; select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; host user password @@ -239,10 +239,10 @@ host db user table_name column_name % test mysqltest_1 t2 c2 show grants for 'mysqltest_1'; Grants for mysqltest_1@% -GRANT SELECT ON *.* TO 'mysqltest_1'@'%' IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' -GRANT INSERT ON "test".* TO 'mysqltest_1'@'%' -GRANT UPDATE (c2) ON "test"."t2" TO 'mysqltest_1'@'%' -GRANT UPDATE ON "test"."t1" TO 'mysqltest_1'@'%' +GRANT SELECT ON *.* TO "mysqltest_1"@"%" IDENTIFIED BY PASSWORD '*BD447CBA355AF58578D3AE33BA2E2CD388BA08D1' +GRANT INSERT ON "test".* TO "mysqltest_1"@"%" +GRANT UPDATE (c2) ON "test"."t2" TO "mysqltest_1"@"%" +GRANT UPDATE ON "test"."t1" TO "mysqltest_1"@"%" drop user 'mysqltest_1', 'mysqltest_3'; drop user 'mysqltest_1'; ERROR HY000: Operation DROP USER failed for 'mysqltest_1'@'%' @@ -292,19 +292,19 @@ drop user 'mysqltest_2'; create user '%@b'@'b'; show grants for '%@b'@'b'; Grants for %@b@b -GRANT USAGE ON *.* TO '%@b'@'b' +GRANT USAGE ON *.* TO "%@b"@"b" grant select on mysql.* to '%@b'@'b'; show grants for '%@b'@'b'; Grants for %@b@b -GRANT USAGE ON *.* TO '%@b'@'b' -GRANT SELECT ON "mysql".* TO '%@b'@'b' +GRANT USAGE ON *.* TO "%@b"@"b" +GRANT SELECT ON "mysql".* TO "%@b"@"b" rename user '%@b'@'b' to '%@a'@'a'; show grants for '%@b'@'b'; ERROR 42000: There is no such grant defined for user '%@b' on host 'b' show grants for '%@a'@'a'; Grants for %@a@a -GRANT USAGE ON *.* TO '%@a'@'a' -GRANT SELECT ON "mysql".* TO '%@a'@'a' +GRANT USAGE ON *.* TO "%@a"@"a" +GRANT SELECT ON "mysql".* TO "%@a"@"a" drop user '%@a'@'a'; create user mysqltest_2@localhost; grant create user on *.* to mysqltest_2@localhost; @@ -324,8 +324,8 @@ connect user4,localhost,mysqltest_3,,; connection user4; show grants; Grants for mysqltest_3@localhost -GRANT USAGE ON *.* TO 'mysqltest_3'@'localhost' -GRANT INSERT, UPDATE, DELETE ON `mysql`.* TO '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; ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user' insert into mysql.user set host='%', user='mysqltest_B'; @@ -350,8 +350,8 @@ connect n1,127.0.0.1,mysqltest_1,,mysqltest_1,$MASTER_MYPORT,$MASTER_MYSOCK; connection n1; show grants for current_user(); Grants for mysqltest_1@127.0.0.0/255.0.0.0 -GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.0/255.0.0.0' -GRANT ALL PRIVILEGES ON `mysqltest_1`.`t1` TO 'mysqltest_1'@'127.0.0.0/255.0.0.0' +GRANT USAGE ON *.* TO `mysqltest_1`@`127.0.0.0/255.0.0.0` +GRANT ALL PRIVILEGES ON `mysqltest_1`.`t1` TO `mysqltest_1`@`127.0.0.0/255.0.0.0` select * from t1; i 1 diff --git a/mysql-test/main/grant3.result b/mysql-test/main/grant3.result index 4c99fb02f19..e26f19ee492 100644 --- a/mysql-test/main/grant3.result +++ b/mysql-test/main/grant3.result @@ -143,9 +143,9 @@ connect conn1,localhost,mysqltest1,,; connection conn1; SHOW GRANTS; Grants for mysqltest1@% -GRANT USAGE ON *.* TO 'mysqltest1'@'%' -GRANT SELECT, UPDATE ON `mysqltest\_1`.* TO 'mysqltest1'@'%' -GRANT UPDATE ON `mysqltest_1`.* TO 'mysqltest1'@'%' +GRANT USAGE ON *.* TO `mysqltest1`@`%` +GRANT SELECT, UPDATE ON `mysqltest\_1`.* TO `mysqltest1`@`%` +GRANT UPDATE ON `mysqltest_1`.* TO `mysqltest1`@`%` SELECT * FROM mysqltest_1.t1; a disconnect conn1; @@ -166,20 +166,20 @@ RENAME USER 'user1'@'%' TO 'user2'@'%'; # Show privileges after rename and BEFORE grant SHOW GRANTS FOR 'user2'@'%'; Grants for user2@% -GRANT USAGE ON *.* TO 'user2'@'%' +GRANT USAGE ON *.* TO `user2`@`%` GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO 'user2'@'%'; # Show privileges after rename and grant SHOW GRANTS FOR 'user2'@'%'; Grants for user2@% -GRANT USAGE ON *.* TO 'user2'@'%' -GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO 'user2'@'%' +GRANT USAGE ON *.* TO `user2`@`%` +GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO `user2`@`%` # Connect as the renamed user connect conn1, localhost, user2,,; connection conn1; SHOW GRANTS; Grants for user2@% -GRANT USAGE ON *.* TO 'user2'@'%' -GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO 'user2'@'%' +GRANT USAGE ON *.* TO `user2`@`%` +GRANT SELECT (a), INSERT (b) ON `temp`.`t1` TO `user2`@`%` SELECT a FROM temp.t1; a 1 diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result index c0fecf0c369..6f474e3d52a 100644 --- a/mysql-test/main/grant5.result +++ b/mysql-test/main/grant5.result @@ -8,11 +8,11 @@ connect conn_1, localhost, test,,; set role foo; show grants for test; Grants for test@% -GRANT foo TO 'test'@'%' -GRANT USAGE ON *.* TO 'test'@'%' +GRANT `foo` TO `test`@`%` +GRANT USAGE ON *.* TO `test`@`%` show grants for foo; Grants for foo -GRANT USAGE ON *.* TO 'foo' +GRANT USAGE ON *.* TO `foo` show grants for foo@'%'; ERROR 42000: Access denied for user 'test'@'%' to database 'mysql' connection default; @@ -25,3 +25,98 @@ ERROR HY000: Table 'user' was not locked with LOCK TABLES REVOKE PROCESS ON *.* FROM u; ERROR HY000: Table 'user' was not locked with LOCK TABLES DROP TABLE t1; +# +# MDEV-20076: SHOW GRANTS does not quote role names properly +# +create role 'role1'; +create role 'fetch'; +create role 'role-1'; +create role 'rock\'n\'roll'; +create user 'user1'@'localhost'; +create user 'fetch'@'localhost'; +create user 'user-1'@'localhost'; +create user 'O\'Brien'@'localhost'; +grant select on mysql.user to role1; +grant select on mysql.user to 'fetch'; +grant select on mysql.user to 'role-1'; +grant select on mysql.user to 'rock\'n\'roll'; +GRANT 'role1' TO 'user1'@'localhost'; +GRANT 'fetch' TO 'fetch'@'localhost'; +GRANT 'role-1' TO 'user-1'@'localhost'; +GRANT 'rock\'n\'roll' TO 'O\'Brien'@'localhost'; +show grants for 'role1'; +Grants for role1 +GRANT USAGE ON *.* TO `role1` +GRANT SELECT ON `mysql`.`user` TO `role1` +show grants for 'fetch'; +Grants for fetch +GRANT USAGE ON *.* TO `fetch` +GRANT SELECT ON `mysql`.`user` TO `fetch` +show grants for 'role-1'; +Grants for role-1 +GRANT USAGE ON *.* TO `role-1` +GRANT SELECT ON `mysql`.`user` TO `role-1` +show grants for 'rock\'n\'roll'; +Grants for rock'n'roll +GRANT USAGE ON *.* TO `rock'n'roll` +GRANT SELECT ON `mysql`.`user` TO `rock'n'roll` +show grants for 'user1'@'localhost'; +Grants for user1@localhost +GRANT `role1` TO `user1`@`localhost` +GRANT USAGE ON *.* TO `user1`@`localhost` +show grants for 'fetch'@'localhost'; +Grants for fetch@localhost +GRANT `fetch` TO `fetch`@`localhost` +GRANT USAGE ON *.* TO `fetch`@`localhost` +show grants for 'user-1'@'localhost'; +Grants for user-1@localhost +GRANT `role-1` TO `user-1`@`localhost` +GRANT USAGE ON *.* TO `user-1`@`localhost` +show grants for 'O\'Brien'@'localhost'; +Grants for O'Brien@localhost +GRANT `rock'n'roll` TO `O'Brien`@`localhost` +GRANT USAGE ON *.* TO `O'Brien`@`localhost` +set @save_sql_quote_show_create= @@sql_quote_show_create; +set @@sql_quote_show_create= OFF; +show grants for 'role1'; +Grants for role1 +GRANT USAGE ON *.* TO role1 +GRANT SELECT ON `mysql`.`user` TO role1 +show grants for 'fetch'; +Grants for fetch +GRANT USAGE ON *.* TO `fetch` +GRANT SELECT ON `mysql`.`user` TO `fetch` +show grants for 'role-1'; +Grants for role-1 +GRANT USAGE ON *.* TO `role-1` +GRANT SELECT ON `mysql`.`user` TO `role-1` +show grants for 'rock\'n\'roll'; +Grants for rock'n'roll +GRANT USAGE ON *.* TO `rock'n'roll` +GRANT SELECT ON `mysql`.`user` TO `rock'n'roll` +show grants for 'user1'@'localhost'; +Grants for user1@localhost +GRANT role1 TO user1@localhost +GRANT USAGE ON *.* TO user1@localhost +show grants for 'fetch'@'localhost'; +Grants for fetch@localhost +GRANT `fetch` TO `fetch`@localhost +GRANT USAGE ON *.* TO `fetch`@localhost +show grants for 'user-1'@'localhost'; +Grants for user-1@localhost +GRANT `role-1` TO `user-1`@localhost +GRANT USAGE ON *.* TO `user-1`@localhost +show grants for 'O\'Brien'@'localhost'; +Grants for O'Brien@localhost +GRANT `rock'n'roll` TO `O'Brien`@localhost +GRANT USAGE ON *.* TO `O'Brien`@localhost +set @@sql_quote_show_create= @save_sql_quote_show_create; +drop role 'role1'; +drop role 'fetch'; +drop role 'role-1'; +drop role 'rock\'n\'roll'; +drop user 'user1'@'localhost'; +drop user 'fetch'@'localhost'; +drop user 'user-1'@'localhost'; +drop user 'O\'Brien'@'localhost'; +# End of 10.3 tests diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test index 649bba7d1ca..63ea5590235 100644 --- a/mysql-test/main/grant5.test +++ b/mysql-test/main/grant5.test @@ -33,3 +33,53 @@ REVOKE EXECUTE ON PROCEDURE sp FROM u; --error ER_TABLE_NOT_LOCKED REVOKE PROCESS ON *.* FROM u; DROP TABLE t1; + +--echo # +--echo # MDEV-20076: SHOW GRANTS does not quote role names properly +--echo # + +create role 'role1'; +create role 'fetch'; +create role 'role-1'; +create role 'rock\'n\'roll'; +create user 'user1'@'localhost'; +create user 'fetch'@'localhost'; +create user 'user-1'@'localhost'; +create user 'O\'Brien'@'localhost'; +grant select on mysql.user to role1; +grant select on mysql.user to 'fetch'; +grant select on mysql.user to 'role-1'; +grant select on mysql.user to 'rock\'n\'roll'; +GRANT 'role1' TO 'user1'@'localhost'; +GRANT 'fetch' TO 'fetch'@'localhost'; +GRANT 'role-1' TO 'user-1'@'localhost'; +GRANT 'rock\'n\'roll' TO 'O\'Brien'@'localhost'; +show grants for 'role1'; +show grants for 'fetch'; +show grants for 'role-1'; +show grants for 'rock\'n\'roll'; +show grants for 'user1'@'localhost'; +show grants for 'fetch'@'localhost'; +show grants for 'user-1'@'localhost'; +show grants for 'O\'Brien'@'localhost'; +set @save_sql_quote_show_create= @@sql_quote_show_create; +set @@sql_quote_show_create= OFF; +show grants for 'role1'; +show grants for 'fetch'; +show grants for 'role-1'; +show grants for 'rock\'n\'roll'; +show grants for 'user1'@'localhost'; +show grants for 'fetch'@'localhost'; +show grants for 'user-1'@'localhost'; +show grants for 'O\'Brien'@'localhost'; +set @@sql_quote_show_create= @save_sql_quote_show_create; +drop role 'role1'; +drop role 'fetch'; +drop role 'role-1'; +drop role 'rock\'n\'roll'; +drop user 'user1'@'localhost'; +drop user 'fetch'@'localhost'; +drop user 'user-1'@'localhost'; +drop user 'O\'Brien'@'localhost'; + +--echo # End of 10.3 tests diff --git a/mysql-test/main/grant_cache_no_prot.result b/mysql-test/main/grant_cache_no_prot.result index 04eb2469732..780fb254b76 100644 --- a/mysql-test/main/grant_cache_no_prot.result +++ b/mysql-test/main/grant_cache_no_prot.result @@ -14,11 +14,11 @@ connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection root; show grants for current_user; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION create database if not exists mysqltest; create table mysqltest.t1 (a int,b int,c int); @@ -65,8 +65,8 @@ connect user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK; connection user1; show grants for current_user(); Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 6 @@ -131,7 +131,7 @@ connect unkuser,localhost,unkuser,,,$MASTER_MYPORT,$MASTER_MYSOCK; connection unkuser; show grants for current_user(); Grants for @localhost -GRANT USAGE ON *.* TO ''@'localhost' +GRANT USAGE ON *.* TO ``@`localhost` connect user2,localhost,mysqltest_2,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK; connection user2; select "user2"; @@ -197,8 +197,8 @@ user4 user4 show grants; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` select a from t1; ERROR 3D000: No database selected select * from mysqltest.t1,test.t1; diff --git a/mysql-test/main/grant_cache_ps_prot.result b/mysql-test/main/grant_cache_ps_prot.result index 3bc51430fd0..9dcf8c4aa8f 100644 --- a/mysql-test/main/grant_cache_ps_prot.result +++ b/mysql-test/main/grant_cache_ps_prot.result @@ -14,11 +14,11 @@ connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection root; show grants for current_user; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION create database if not exists mysqltest; create table mysqltest.t1 (a int,b int,c int); @@ -65,8 +65,8 @@ connect user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK; connection user1; show grants for current_user(); Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 6 @@ -131,7 +131,7 @@ connect unkuser,localhost,unkuser,,,$MASTER_MYPORT,$MASTER_MYSOCK; connection unkuser; show grants for current_user(); Grants for @localhost -GRANT USAGE ON *.* TO ''@'localhost' +GRANT USAGE ON *.* TO ``@`localhost` connect user2,localhost,mysqltest_2,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK; connection user2; select "user2"; @@ -197,8 +197,8 @@ user4 user4 show grants; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT ON `mysqltest`.* TO `mysqltest_1`@`localhost` select a from t1; ERROR 3D000: No database selected select * from mysqltest.t1,test.t1; diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index bca22b4885e..b11d8d432e0 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -1039,8 +1039,8 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user1'@'localhost' def USAGE NO show grants; Grants for user1@localhost -GRANT USAGE ON *.* TO 'user1'@'localhost' -GRANT SELECT (f1) ON `mysqltest`.`t1` TO 'user1'@'localhost' +GRANT USAGE ON *.* TO `user1`@`localhost` +GRANT SELECT (f1) ON `mysqltest`.`t1` TO `user1`@`localhost` connection con2; select * from information_schema.column_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE @@ -1054,8 +1054,8 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user2'@'localhost' def USAGE NO show grants; Grants for user2@localhost -GRANT USAGE ON *.* TO 'user2'@'localhost' -GRANT SELECT ON `mysqltest`.`t2` TO 'user2'@'localhost' +GRANT USAGE ON *.* TO `user2`@`localhost` +GRANT SELECT ON `mysqltest`.`t2` TO `user2`@`localhost` connection con3; select * from information_schema.column_privileges order by grantee; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE @@ -1069,8 +1069,8 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user3'@'localhost' def USAGE NO show grants; Grants for user3@localhost -GRANT USAGE ON *.* TO 'user3'@'localhost' -GRANT SELECT ON `mysqltest`.* TO 'user3'@'localhost' +GRANT USAGE ON *.* TO `user3`@`localhost` +GRANT SELECT ON `mysqltest`.* TO `user3`@`localhost` connection con4; select * from information_schema.column_privileges where grantee like '\'user%' order by grantee; @@ -1093,7 +1093,7 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'user4'@'localhost' def SELECT NO show grants; Grants for user4@localhost -GRANT SELECT ON *.* TO 'user4'@'localhost' +GRANT SELECT ON *.* TO `user4`@`localhost` connection default; disconnect con1; disconnect con2; diff --git a/mysql-test/main/invisible_field_grant_completely.result b/mysql-test/main/invisible_field_grant_completely.result index 208a9f24ddf..aa0a768c51c 100644 --- a/mysql-test/main/invisible_field_grant_completely.result +++ b/mysql-test/main/invisible_field_grant_completely.result @@ -2,7 +2,7 @@ set @old_debug= @@debug_dbug; create user user_1; show grants for user_1; Grants for user_1@% -GRANT USAGE ON *.* TO 'user_1'@'%' +GRANT USAGE ON *.* TO `user_1`@`%` # create user create database d; use d; diff --git a/mysql-test/main/invisible_field_grant_system.result b/mysql-test/main/invisible_field_grant_system.result index 77acfdae744..b69478c58b3 100644 --- a/mysql-test/main/invisible_field_grant_system.result +++ b/mysql-test/main/invisible_field_grant_system.result @@ -1,7 +1,7 @@ create user user_1; show grants for user_1; Grants for user_1@% -GRANT USAGE ON *.* TO 'user_1'@'%' +GRANT USAGE ON *.* TO `user_1`@`%` # create user create database d; use d; diff --git a/mysql-test/main/ipv4_and_ipv6.result b/mysql-test/main/ipv4_and_ipv6.result index 447c20536e2..9ae55c56f65 100644 --- a/mysql-test/main/ipv4_and_ipv6.result +++ b/mysql-test/main/ipv4_and_ipv6.result @@ -4,8 +4,8 @@ CREATE USER testuser@'::1' identified by '1234'; GRANT ALL ON test.* TO testuser@'::1'; SHOW GRANTS FOR testuser@'::1'; Grants for testuser@::1 -GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1' +GRANT USAGE ON *.* TO `testuser`@`::1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`::1` SET @nip= inet_aton('::1'); SELECT @nip; @nip @@ -36,8 +36,8 @@ CREATE USER testuser@'127.0.0.1' identified by '1234'; GRANT ALL ON test.* TO testuser@'127.0.0.1'; SHOW GRANTS FOR testuser@'127.0.0.1'; Grants for testuser@127.0.0.1 -GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1' +GRANT USAGE ON *.* TO `testuser`@`127.0.0.1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`127.0.0.1` SET @nip= inet_aton('127.0.0.1'); SELECT @nip; @nip diff --git a/mysql-test/main/ipv4_as_ipv6.result b/mysql-test/main/ipv4_as_ipv6.result index b92b545da86..3b523454b3b 100644 --- a/mysql-test/main/ipv4_as_ipv6.result +++ b/mysql-test/main/ipv4_as_ipv6.result @@ -4,8 +4,8 @@ CREATE USER testuser@'127.0.0.1' identified by '1234'; GRANT ALL ON test.* TO testuser@'127.0.0.1'; SHOW GRANTS FOR testuser@'127.0.0.1'; Grants for testuser@127.0.0.1 -GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1' +GRANT USAGE ON *.* TO `testuser`@`127.0.0.1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`127.0.0.1` SET @nip= inet_aton('127.0.0.1'); SELECT @nip; @nip @@ -36,8 +36,8 @@ CREATE USER testuser@'0:0:0:0:0:FFFF:127.0.0.1' identified by '1234'; GRANT ALL ON test.* TO testuser@'0:0:0:0:0:FFFF:127.0.0.1'; SHOW GRANTS FOR testuser@'0:0:0:0:0:FFFF:127.0.0.1'; Grants for testuser@0:0:0:0:0:ffff:127.0.0.1 -GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:ffff:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:ffff:127.0.0.1' +GRANT USAGE ON *.* TO `testuser`@`0:0:0:0:0:ffff:127.0.0.1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`0:0:0:0:0:ffff:127.0.0.1` SET @nip= inet_aton('0:0:0:0:0:FFFF:127.0.0.1'); SELECT @nip; @nip @@ -68,8 +68,8 @@ CREATE USER testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1' identified by '12 GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:FFFF:127.0.0.1'; Grants for testuser@0000:0000:0000:0000:0000:ffff:127.0.0.1 -GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:ffff:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:ffff:127.0.0.1' +GRANT USAGE ON *.* TO `testuser`@`0000:0000:0000:0000:0000:ffff:127.0.0.1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`0000:0000:0000:0000:0000:ffff:127.0.0.1` SET @nip= inet_aton('0000:0000:0000:0000:0000:FFFF:127.0.0.1'); SELECT @nip; @nip @@ -100,8 +100,8 @@ CREATE USER testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1' identified by '1234'; GRANT ALL ON test.* TO testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; SHOW GRANTS FOR testuser@'0:0000:0000:0:0000:FFFF:127.0.0.1'; Grants for testuser@0:0000:0000:0:0000:ffff:127.0.0.1 -GRANT USAGE ON *.* TO 'testuser'@'0:0000:0000:0:0000:ffff:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0000:0000:0:0000:ffff:127.0.0.1' +GRANT USAGE ON *.* TO `testuser`@`0:0000:0000:0:0000:ffff:127.0.0.1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`0:0000:0000:0:0000:ffff:127.0.0.1` SET @nip= inet_aton('0:0000:0000:0:0000:FFFF:127.0.0.1'); SELECT @nip; @nip @@ -132,8 +132,8 @@ CREATE USER testuser@'0::0000:FFFF:127.0.0.1' identified by '1234'; GRANT ALL ON test.* TO testuser@'0::0000:FFFF:127.0.0.1'; SHOW GRANTS FOR testuser@'0::0000:FFFF:127.0.0.1'; Grants for testuser@0::0000:ffff:127.0.0.1 -GRANT USAGE ON *.* TO 'testuser'@'0::0000:ffff:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0::0000:ffff:127.0.0.1' +GRANT USAGE ON *.* TO `testuser`@`0::0000:ffff:127.0.0.1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`0::0000:ffff:127.0.0.1` SET @nip= inet_aton('0::0000:FFFF:127.0.0.1'); SELECT @nip; @nip @@ -165,8 +165,8 @@ CREATE USER testuser@'::FFFF:127.0.0.1' identified by '1234'; GRANT ALL ON test.* TO testuser@'::FFFF:127.0.0.1'; SHOW GRANTS FOR testuser@'::FFFF:127.0.0.1'; Grants for testuser@::ffff:127.0.0.1 -GRANT USAGE ON *.* TO 'testuser'@'::ffff:127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::ffff:127.0.0.1' +GRANT USAGE ON *.* TO `testuser`@`::ffff:127.0.0.1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`::ffff:127.0.0.1` SET @nip= inet_aton('::FFFF:127.0.0.1'); SELECT @nip; @nip diff --git a/mysql-test/main/ipv6.result b/mysql-test/main/ipv6.result index 1540b4825e5..31a4857659c 100644 --- a/mysql-test/main/ipv6.result +++ b/mysql-test/main/ipv6.result @@ -4,8 +4,8 @@ CREATE USER testuser@'::1' identified by '1234'; GRANT ALL ON test.* TO testuser@'::1'; SHOW GRANTS FOR testuser@'::1'; Grants for testuser@::1 -GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1' +GRANT USAGE ON *.* TO `testuser`@`::1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`::1` SET @nip= inet_aton('::1'); SELECT @nip; @nip @@ -37,8 +37,8 @@ CREATE USER testuser@'0000:0000:0000:0000:0000:0000:0000:0001' identified by '12 GRANT ALL ON test.* TO testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; SHOW GRANTS FOR testuser@'0000:0000:0000:0000:0000:0000:0000:0001'; Grants for testuser@0000:0000:0000:0000:0000:0000:0000:0001 -GRANT USAGE ON *.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0000:0000:0000:0000:0000:0000:0000:0001' +GRANT USAGE ON *.* TO `testuser`@`0000:0000:0000:0000:0000:0000:0000:0001` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`0000:0000:0000:0000:0000:0000:0000:0001` SET @nip= inet_aton('0000:0000:0000:0000:0000:0000:0000:0001'); SELECT @nip; @nip @@ -69,8 +69,8 @@ CREATE USER testuser@'0:0:0:0:0:0:0:1' identified by '1234'; GRANT ALL ON test.* TO testuser@'0:0:0:0:0:0:0:1'; SHOW GRANTS FOR testuser@'0:0:0:0:0:0:0:1'; Grants for testuser@0:0:0:0:0:0:0:1 -GRANT USAGE ON *.* TO 'testuser'@'0:0:0:0:0:0:0:1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'0:0:0:0:0:0:0:1' +GRANT USAGE ON *.* TO `testuser`@`0:0:0:0:0:0:0:1` IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF' +GRANT ALL PRIVILEGES ON `test`.* TO `testuser`@`0:0:0:0:0:0:0:1` SET @nip= inet_aton('0:0:0:0:0:0:0:1'); SELECT @nip; @nip diff --git a/mysql-test/main/lowercase_table_grant.result b/mysql-test/main/lowercase_table_grant.result index 9ba542ec22d..45b6ab0410f 100644 --- a/mysql-test/main/lowercase_table_grant.result +++ b/mysql-test/main/lowercase_table_grant.result @@ -4,8 +4,8 @@ create database MYSQLtest; grant all on MySQLtest.* to mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_1`@`localhost` select * from db where user = 'mysqltest_1'; Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y @@ -13,8 +13,8 @@ update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' a flush privileges; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_1`@`localhost` select * from db where user = 'mysqltest_1'; Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index 08efe0e8bc8..aa58440747a 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -313,8 +313,8 @@ Phase 7/7: Running 'FLUSH PRIVILEGES' OK SHOW GRANTS FOR 'user3'@'%'; Grants for user3@% -GRANT USAGE ON *.* TO 'user3'@'%' -GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%' +GRANT USAGE ON *.* TO `user3`@`%` +GRANT ALL PRIVILEGES ON `roelt`.`test2` TO `user3`@`%` DROP USER 'user3'@'%'; End of 5.1 tests The --upgrade-system-tables option was used, user tables won't be touched. @@ -586,7 +586,7 @@ Run mysql_upgrade with all privileges on a user flush privileges; SHOW GRANTS FOR 'user3'@'%'; Grants for user3@% -GRANT USAGE ON *.* TO 'user3'@'%' -GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%' +GRANT USAGE ON *.* TO `user3`@`%` +GRANT ALL PRIVILEGES ON `roelt`.`test2` TO `user3`@`%` DROP USER 'user3'@'%'; update mysql.db set Delete_history_priv='Y' where db like 'test%'; diff --git a/mysql-test/main/mysqlbinlog.result b/mysql-test/main/mysqlbinlog.result index c4d95dc6ff7..decd095bbdf 100644 --- a/mysql-test/main/mysqlbinlog.result +++ b/mysql-test/main/mysqlbinlog.result @@ -654,8 +654,8 @@ CREATE USER untrusted@localhost; GRANT SELECT ON mysqltest1.* TO untrusted@localhost; SHOW GRANTS FOR untrusted@localhost; Grants for untrusted@localhost -GRANT USAGE ON *.* TO 'untrusted'@'localhost' -GRANT SELECT ON `mysqltest1`.* TO 'untrusted'@'localhost' +GRANT USAGE ON *.* TO `untrusted`@`localhost` +GRANT SELECT ON `mysqltest1`.* TO `untrusted`@`localhost` USE mysqltest1; CREATE TABLE t1 (a INT, b CHAR(64)); flush logs; diff --git a/mysql-test/main/no_password_column-mdev-11170.result b/mysql-test/main/no_password_column-mdev-11170.result index 6195100436d..6de44dffe42 100644 --- a/mysql-test/main/no_password_column-mdev-11170.result +++ b/mysql-test/main/no_password_column-mdev-11170.result @@ -76,13 +76,13 @@ create user ioo identified with "mysql_old_password" as "7a8f886d28473e85"; # show grants for foo; Grants for foo@% -GRANT USAGE ON *.* TO 'foo'@'%' +GRANT USAGE ON *.* TO `foo`@`%` show grants for goo; Grants for goo@% -GRANT USAGE ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' show grants for ioo; Grants for ioo@% -GRANT USAGE ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85' select user, host, select_priv, plugin, authentication_string from mysql.user where user like "%oo" order by user; @@ -96,13 +96,13 @@ ioo % N mysql_old_password 7a8f886d28473e85 SET PASSWORD FOR foo=PASSWORD("bar"); show grants for foo; Grants for foo@% -GRANT USAGE ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +GRANT USAGE ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' show grants for goo; Grants for goo@% -GRANT USAGE ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' show grants for ioo; Grants for ioo@% -GRANT USAGE ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85' select user, host, select_priv, plugin, authentication_string from mysql.user where user like "%oo" order by user; @@ -116,13 +116,13 @@ ioo % N mysql_old_password 7a8f886d28473e85 flush privileges; show grants for foo; Grants for foo@% -GRANT USAGE ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +GRANT USAGE ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' show grants for goo; Grants for goo@% -GRANT USAGE ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT USAGE ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' show grants for ioo; Grants for ioo@% -GRANT USAGE ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +GRANT USAGE ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85' # # Test granting of privileges. # @@ -131,26 +131,26 @@ grant select on *.* to goo; grant select on *.* to ioo; show grants for foo; Grants for foo@% -GRANT SELECT ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +GRANT SELECT ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' show grants for goo; Grants for goo@% -GRANT SELECT ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT SELECT ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' show grants for ioo; Grants for ioo@% -GRANT SELECT ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +GRANT SELECT ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85' # # Check to see if grants are stable on flush. # flush privileges; show grants for foo; Grants for foo@% -GRANT SELECT ON *.* TO 'foo'@'%' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +GRANT SELECT ON *.* TO `foo`@`%` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' show grants for goo; Grants for goo@% -GRANT SELECT ON *.* TO 'goo'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT SELECT ON *.* TO `goo`@`%` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' show grants for ioo; Grants for ioo@% -GRANT SELECT ON *.* TO 'ioo'@'%' IDENTIFIED BY PASSWORD '7a8f886d28473e85' +GRANT SELECT ON *.* TO `ioo`@`%` IDENTIFIED BY PASSWORD '7a8f886d28473e85' # # Check internal table representation. # diff --git a/mysql-test/main/partition_grant.result b/mysql-test/main/partition_grant.result index cd8f8a970d0..41934896aeb 100644 --- a/mysql-test/main/partition_grant.result +++ b/mysql-test/main/partition_grant.result @@ -10,8 +10,8 @@ grant select,alter on mysqltest_1.* to mysqltest_1@localhost; connect conn1,localhost,mysqltest_1,,mysqltest_1; show grants for current_user; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT SELECT, ALTER ON `mysqltest_1`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT SELECT, ALTER ON `mysqltest_1`.* TO `mysqltest_1`@`localhost` alter table t1 add b int; alter table t1 drop partition p2; ERROR 42000: DROP command denied to user 'mysqltest_1'@'localhost' for table 't1' diff --git a/mysql-test/main/plugin_auth.result b/mysql-test/main/plugin_auth.result index eeb65187fea..66495da65e7 100644 --- a/mysql-test/main/plugin_auth.result +++ b/mysql-test/main/plugin_auth.result @@ -185,18 +185,18 @@ in default connection disconnect proxy_admin_con; SHOW GRANTS FOR grant_plug; Grants for grant_plug@% -GRANT ALL PRIVILEGES ON *.* TO 'grant_plug'@'%' IDENTIFIED VIA test_plugin_server USING 'grant_plug_dest' +GRANT ALL PRIVILEGES ON *.* TO `grant_plug`@`%` IDENTIFIED VIA test_plugin_server USING 'grant_plug_dest' GRANT PROXY ON 'future_user'@'%' TO 'grant_plug'@'%' REVOKE PROXY ON future_user FROM grant_plug; SHOW GRANTS FOR grant_plug; Grants for grant_plug@% -GRANT ALL PRIVILEGES ON *.* TO 'grant_plug'@'%' IDENTIFIED VIA test_plugin_server USING 'grant_plug_dest' +GRANT ALL PRIVILEGES ON *.* TO `grant_plug`@`%` IDENTIFIED VIA test_plugin_server USING 'grant_plug_dest' ## testing drop user CREATE USER test_drop@localhost; GRANT PROXY ON future_user TO test_drop@localhost; SHOW GRANTS FOR test_drop@localhost; Grants for test_drop@localhost -GRANT USAGE ON *.* TO 'test_drop'@'localhost' +GRANT USAGE ON *.* TO `test_drop`@`localhost` GRANT PROXY ON 'future_user'@'%' TO 'test_drop'@'localhost' DROP USER test_drop@localhost; SELECT * FROM mysql.proxies_priv WHERE Host = 'test_drop' AND User = 'localhost'; diff --git a/mysql-test/main/ps_grant.result b/mysql-test/main/ps_grant.result index 0e296cdc699..ab21c198b98 100644 --- a/mysql-test/main/ps_grant.result +++ b/mysql-test/main/ps_grant.result @@ -11,8 +11,8 @@ grant select on mysqltest.t9 to second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` connect con3,localhost,second_user,looser,mysqltest; connection con3; select current_user(); @@ -20,8 +20,8 @@ current_user() second_user@localhost show grants for current_user(); Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` prepare s_t9 from 'select c1 as my_col from t9 where c1= 1' ; execute s_t9 ; @@ -34,21 +34,21 @@ grant select on mysqltest.t1 to second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' -GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost` drop table mysqltest.t9 ; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' -GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost` connection con3; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' -GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost` prepare s_t1 from 'select a as my_col from t1' ; execute s_t1 ; my_col @@ -63,13 +63,13 @@ connection default; revoke all privileges on mysqltest.t1 from second_user@localhost; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` connection con3; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` execute s_t1 ; ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1' connection default; @@ -77,7 +77,7 @@ disconnect con3; revoke all privileges, grant option from second_user@localhost ; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' drop user second_user@localhost ; commit ; show grants for second_user@localhost ; diff --git a/mysql-test/main/set_password.result b/mysql-test/main/set_password.result index 733d9c96187..11432a40d28 100644 --- a/mysql-test/main/set_password.result +++ b/mysql-test/main/set_password.result @@ -168,7 +168,7 @@ user() current_user() foo@localhost foo@localhost show grants; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' +GRANT USAGE ON *.* TO `foo`@`localhost` IDENTIFIED BY PASSWORD '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB' disconnect foo; connection default; select user,host,password,plugin,authentication_string from mysql.user where user='foo'; diff --git a/mysql-test/main/show_create_user.result b/mysql-test/main/show_create_user.result index 63013eca074..63acc38295a 100644 --- a/mysql-test/main/show_create_user.result +++ b/mysql-test/main/show_create_user.result @@ -1,27 +1,27 @@ create user foo; show create user foo; CREATE USER for foo@% -CREATE USER 'foo'@'%' +CREATE USER `foo`@`%` create user foo@test; show create user foo@test; CREATE USER for foo@test -CREATE USER 'foo'@'test' +CREATE USER `foo`@`test` create user foo2@test identified by 'password'; show create user foo2@test; CREATE USER for foo2@test -CREATE USER 'foo2'@'test' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' +CREATE USER `foo2`@`test` IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' alter user foo2@test identified with 'someplugin' as 'somepassword'; show create user foo2@test; CREATE USER for foo2@test -CREATE USER 'foo2'@'test' IDENTIFIED VIA someplugin USING 'somepassword' +CREATE USER `foo2`@`test` IDENTIFIED VIA someplugin USING 'somepassword' create user foo3@test require SSL; show create user foo3@test; CREATE USER for foo3@test -CREATE USER 'foo3'@'test' REQUIRE SSL +CREATE USER `foo3`@`test` REQUIRE SSL create user foo4@test require cipher 'text' issuer 'foo_issuer' subject 'foo_subject'; show create user foo4@test; CREATE USER for foo4@test -CREATE USER 'foo4'@'test' REQUIRE ISSUER 'foo_issuer' SUBJECT 'foo_subject' CIPHER 'text' +CREATE USER `foo4`@`test` REQUIRE ISSUER 'foo_issuer' SUBJECT 'foo_subject' CIPHER 'text' create user foo5@test require SSL with MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 @@ -30,7 +30,7 @@ MAX_USER_CONNECTIONS 40 MAX_STATEMENT_TIME 0.5; show create user foo5@test; CREATE USER for foo5@test -CREATE USER 'foo5'@'test' REQUIRE SSL WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 MAX_USER_CONNECTIONS 40 MAX_STATEMENT_TIME 0.500000 +CREATE USER `foo5`@`test` REQUIRE SSL WITH MAX_QUERIES_PER_HOUR 10 MAX_UPDATES_PER_HOUR 20 MAX_CONNECTIONS_PER_HOUR 30 MAX_USER_CONNECTIONS 40 MAX_STATEMENT_TIME 0.500000 drop user foo5@test; drop user foo4@test; drop user foo3@test; diff --git a/mysql-test/main/show_grants_with_plugin-7985.result b/mysql-test/main/show_grants_with_plugin-7985.result index bb475b7cba9..b07603aaf91 100644 --- a/mysql-test/main/show_grants_with_plugin-7985.result +++ b/mysql-test/main/show_grants_with_plugin-7985.result @@ -13,16 +13,16 @@ u1 % # show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT SELECT ON `mysql`.* TO `u1`@`%` # # Test to see if connecting with no password is succesful. # connect con1, localhost, u1,,; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -32,8 +32,8 @@ flush privileges; connect con1, localhost, u1,,; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -50,8 +50,8 @@ u1 % *7AFEFD08B6B720E781FB000CAA418F54FA662626 connect con1, localhost, u1,'SOMETHING',; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -61,8 +61,8 @@ flush privileges; connect con1, localhost, u1,'SOMETHING',; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -78,16 +78,16 @@ u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 mysql_native_password *054B7BBD2B # show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO `u1`@`%` # # Logging in with the user's password should work. # connect con1, localhost, u1,'SOMETHINGELSE',; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -96,16 +96,16 @@ connection default; flush privileges; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO `u1`@`%` # # Here we connect via the user's password again. # connect con1, localhost, u1,'SOMETHINGELSE',; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -119,8 +119,8 @@ u1 % *054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6 flush privileges; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*054B7BBD2B9A553DA560520DCD3F76DA2D81B7C6' +GRANT SELECT ON `mysql`.* TO `u1`@`%` # # Here we connect via the user's password. # @@ -143,16 +143,16 @@ GRANT SELECT ON mysql.* to u1 IDENTIFIED VIA mysql_native_password USING '*7AFEFD08B6B720E781FB000CAA418F54FA662626'; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO `u1`@`%` # # Test if the user can now use that password instead. # connect con1, localhost, u1,'SOMETHING',; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; # # Test if the user can now use that password instead, after flushing privileges; @@ -162,8 +162,8 @@ flush privileges; connect con1, localhost, u1,'SOMETHING',; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` IDENTIFIED BY PASSWORD '*7AFEFD08B6B720E781FB000CAA418F54FA662626' +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -179,8 +179,8 @@ u1 % mysql_native_password connect con1, localhost, u1,,; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; # @@ -190,8 +190,8 @@ flush privileges; connect con1, localhost, u1,,; show grants; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT SELECT ON `mysql`.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT SELECT ON `mysql`.* TO `u1`@`%` disconnect con1; connection default; drop user u1; diff --git a/mysql-test/main/skip_name_resolve.result b/mysql-test/main/skip_name_resolve.result index 1362e482717..9a903ebf472 100644 --- a/mysql-test/main/skip_name_resolve.result +++ b/mysql-test/main/skip_name_resolve.result @@ -2,8 +2,8 @@ CREATE USER mysqltest_1@'127.0.0.1/255.255.255.255'; GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255'; SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255'; Grants for mysqltest_1@127.0.0.1/255.255.255.255 -GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255' -GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255' +GRANT USAGE ON *.* TO `mysqltest_1`@`127.0.0.1/255.255.255.255` +GRANT ALL PRIVILEGES ON `test`.* TO `mysqltest_1`@`127.0.0.1/255.255.255.255` REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255'; DROP USER mysqltest_1@'127.0.0.1/255.255.255.255'; connect con1, localhost, root, , test, $MASTER_MYPORT, ; diff --git a/mysql-test/main/sp-security.result b/mysql-test/main/sp-security.result index de33c11a28f..1dea23a5271 100644 --- a/mysql-test/main/sp-security.result +++ b/mysql-test/main/sp-security.result @@ -195,14 +195,14 @@ grant insert on t1 to usera@localhost; grant execute on procedure sptest.p1 to usera@localhost; show grants for usera@localhost; Grants for usera@localhost -GRANT USAGE ON *.* TO 'usera'@'localhost' -GRANT INSERT ON `test`.`t1` TO 'usera'@'localhost' -GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO 'usera'@'localhost' +GRANT USAGE ON *.* TO `usera`@`localhost` +GRANT INSERT ON `test`.`t1` TO `usera`@`localhost` +GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO `usera`@`localhost` grant execute on procedure sptest.p1 to userc@localhost with grant option; show grants for userc@localhost; Grants for userc@localhost -GRANT USAGE ON *.* TO 'userc'@'localhost' -GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO 'userc'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `userc`@`localhost` +GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO `userc`@`localhost` WITH GRANT OPTION connect con2usera,localhost,usera,,; connect con3userb,localhost,userb,,; connect con4userc,localhost,userc,,; @@ -239,18 +239,18 @@ userb@localhost 4 grant all privileges on procedure sptest.p1 to userc@localhost; show grants for userc@localhost; Grants for userc@localhost -GRANT USAGE ON *.* TO 'userc'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `sptest`.`p1` TO 'userc'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `userc`@`localhost` +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `sptest`.`p1` TO `userc`@`localhost` WITH GRANT OPTION show grants for userb@localhost; Grants for userb@localhost -GRANT USAGE ON *.* TO 'userb'@'localhost' -GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO 'userb'@'localhost' +GRANT USAGE ON *.* TO `userb`@`localhost` +GRANT EXECUTE ON PROCEDURE `sptest`.`p1` TO `userb`@`localhost` connection con4userc; revoke all privileges on procedure sptest.p1 from userb@localhost; connection con1root; show grants for userb@localhost; Grants for userb@localhost -GRANT USAGE ON *.* TO 'userb'@'localhost' +GRANT USAGE ON *.* TO `userb`@`localhost` disconnect con4userc; disconnect con3userb; disconnect con2usera; @@ -723,14 +723,14 @@ user() current_user() foo@localhost foo@local_ost show grants; Grants for foo@local_ost -GRANT USAGE ON *.* TO 'foo'@'local_ost' -GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'local_ost' +GRANT USAGE ON *.* TO `foo`@`local_ost` +GRANT CREATE ROUTINE ON `foodb`.* TO `foo`@`local_ost` create procedure fooproc() select 'i am fooproc'; show grants; Grants for foo@local_ost -GRANT USAGE ON *.* TO 'foo'@'local_ost' -GRANT CREATE ROUTINE ON `foodb`.* TO 'foo'@'local_ost' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO 'foo'@'local_ost' +GRANT USAGE ON *.* TO `foo`@`local_ost` +GRANT CREATE ROUTINE ON `foodb`.* TO `foo`@`local_ost` +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`fooproc` TO `foo`@`local_ost` disconnect con1; connection default; drop user foo@local_ost; @@ -772,13 +772,13 @@ set password=password('foobar'); create procedure sp1() select 1; show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION grant execute on procedure sp1 to current_user() identified by 'barfoo'; show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION -GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO 'root'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION +GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO `root`@`localhost` GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop procedure sp1; set password=''; diff --git a/mysql-test/main/sp_notembedded.result b/mysql-test/main/sp_notembedded.result index fe95508cb9d..0d04f23326d 100644 --- a/mysql-test/main/sp_notembedded.result +++ b/mysql-test/main/sp_notembedded.result @@ -8,11 +8,11 @@ show grants for 'root'@'localhost'; end| call bug4902()| Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION call bug4902()| Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop procedure bug4902| drop procedure if exists bug4902_2| @@ -159,11 +159,11 @@ create procedure 15298_2 () sql security definer show grants; connect con1,localhost,mysqltest_1,,test; call 15298_1(); Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION call 15298_2(); Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION connection default; disconnect con1; @@ -330,21 +330,21 @@ update mysql.user set password = replace(password, '*', '-') where user='foo1'; connect foo,localhost,foo1,foo; show grants; Grants for foo1@localhost -GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' -GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost' +GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT CREATE ROUTINE ON `test`.* TO `foo1`@`localhost` connection default; flush privileges; connection foo; show grants; Grants for foo1@localhost -GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF' -GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost' +GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT CREATE ROUTINE ON `test`.* TO `foo1`@`localhost` create procedure spfoo() select 1; show grants; Grants for foo1@localhost -GRANT USAGE ON *.* TO 'foo1'@'localhost' IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF' -GRANT CREATE ROUTINE ON `test`.* TO 'foo1'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`spfoo` TO 'foo1'@'localhost' +GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '-F3A2A51A9B0F2BE2468926B4132313728C250DBF' +GRANT CREATE ROUTINE ON `test`.* TO `foo1`@`localhost` +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE `test`.`spfoo` TO `foo1`@`localhost` connection default; disconnect foo; drop procedure spfoo; diff --git a/mysql-test/main/timezone_grant.result b/mysql-test/main/timezone_grant.result index 42ce458d00f..bacc8348e89 100644 --- a/mysql-test/main/timezone_grant.result +++ b/mysql-test/main/timezone_grant.result @@ -13,8 +13,8 @@ connect tzuser, localhost, mysqltest_1,,; connection tzuser; show grants for current_user(); Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `mysqltest_1`@`localhost` set time_zone= '+00:00'; set time_zone= 'Europe/Moscow'; select convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC'); @@ -39,9 +39,9 @@ connect tzuser2, localhost, mysqltest_1,,; connection tzuser2; show grants for current_user(); Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.`t2` TO 'mysqltest_1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.`t1` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t2` TO `mysqltest_1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t1` TO `mysqltest_1`@`localhost` set time_zone= '+00:00'; set time_zone= 'Europe/Moscow'; select convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC'); diff --git a/mysql-test/main/trigger_notembedded.result b/mysql-test/main/trigger_notembedded.result index 3ee84c3c308..94e651b1340 100644 --- a/mysql-test/main/trigger_notembedded.result +++ b/mysql-test/main/trigger_notembedded.result @@ -194,8 +194,8 @@ use mysqltest_db1; GRANT DELETE ON mysqltest_db1.* TO mysqltest_u1@localhost; SHOW GRANTS FOR mysqltest_u1@localhost; Grants for mysqltest_u1@localhost -GRANT USAGE ON *.* TO 'mysqltest_u1'@'localhost' -GRANT DELETE, TRIGGER ON `mysqltest_db1`.* TO 'mysqltest_u1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_u1`@`localhost` +GRANT DELETE, TRIGGER ON `mysqltest_db1`.* TO `mysqltest_u1`@`localhost` connection bug15166_u1_con; use mysqltest_db1; CREATE TRIGGER t1_trg_after_delete AFTER DELETE ON t1 diff --git a/mysql-test/main/user_limits.result b/mysql-test/main/user_limits.result index bbf73d7c617..ffb8bb204a6 100644 --- a/mysql-test/main/user_limits.result +++ b/mysql-test/main/user_limits.result @@ -108,11 +108,11 @@ connection default; grant usage on *.* to mysqltest_1@localhost with max_user_connections -1; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_USER_CONNECTIONS -1 +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` WITH MAX_USER_CONNECTIONS -1 flush user_resources; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' WITH MAX_USER_CONNECTIONS -1 +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` WITH MAX_USER_CONNECTIONS -1 connect(localhost,mysqltest_1,,test,MYSQL_PORT,MYSQL_SOCK); connect muc5, localhost, mysqltest_1,,; ERROR 42000: User 'mysqltest_1' has exceeded the 'max_user_connections' resource (current value: -1) diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result index 6d22f93fd49..00a93488919 100644 --- a/mysql-test/main/view_grant.result +++ b/mysql-test/main/view_grant.result @@ -4,12 +4,12 @@ create user test@localhost; grant create view on test.* to test@localhost; show grants for test@localhost; Grants for test@localhost -GRANT USAGE ON *.* TO 'test'@'localhost' -GRANT CREATE VIEW ON `test`.* TO 'test'@'localhost' +GRANT USAGE ON *.* TO `test`@`localhost` +GRANT CREATE VIEW ON `test`.* TO `test`@`localhost` revoke create view on test.* from test@localhost; show grants for test@localhost; Grants for test@localhost -GRANT USAGE ON *.* TO 'test'@'localhost' +GRANT USAGE ON *.* TO `test`@`localhost` drop user test@localhost; connect root,localhost,root,,test; connection root; diff --git a/mysql-test/suite/binlog/r/binlog_grant.result b/mysql-test/suite/binlog/r/binlog_grant.result index 201e7b9e722..e077182fe8b 100644 --- a/mysql-test/suite/binlog/r/binlog_grant.result +++ b/mysql-test/suite/binlog/r/binlog_grant.result @@ -4,7 +4,7 @@ set @saved_binlog_format = @@global.binlog_format; create user mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` connect plain,localhost,mysqltest_1,,test; connect root,localhost,root,,test; **** Variable SQL_LOG_BIN **** diff --git a/mysql-test/suite/compat/oracle/r/sp-package-security.result b/mysql-test/suite/compat/oracle/r/sp-package-security.result index 6cb580e0c46..c08b78cb8cf 100644 --- a/mysql-test/suite/compat/oracle/r/sp-package-security.result +++ b/mysql-test/suite/compat/oracle/r/sp-package-security.result @@ -132,15 +132,15 @@ END; $$ SHOW GRANTS; Grants for u1@localhost -GRANT USAGE ON *.* TO 'u1'@'localhost' -GRANT SELECT, CREATE ROUTINE ON "db1".* TO 'u1'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE "db1"."p1" TO 'u1'@'localhost' +GRANT USAGE ON *.* TO "u1"@"localhost" +GRANT SELECT, CREATE ROUTINE ON "db1".* TO "u1"@"localhost" +GRANT EXECUTE, ALTER ROUTINE ON PROCEDURE "db1"."p1" TO "u1"@"localhost" CALL p1; DROP PROCEDURE p1; SHOW GRANTS; Grants for u1@localhost -GRANT USAGE ON *.* TO 'u1'@'localhost' -GRANT SELECT, CREATE ROUTINE ON "db1".* TO 'u1'@'localhost' +GRANT USAGE ON *.* TO "u1"@"localhost" +GRANT SELECT, CREATE ROUTINE ON "db1".* TO "u1"@"localhost" # # Now u1 can also CREATE, DROP its own package specifications # @@ -157,14 +157,14 @@ FUNCTION f1 RETURN TEXT; END latin1 latin1_swedish_ci latin1_swedish_ci SHOW GRANTS; Grants for u1@localhost -GRANT USAGE ON *.* TO 'u1'@'localhost' -GRANT SELECT, CREATE ROUTINE ON "db1".* TO 'u1'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PACKAGE "db1"."pkg2" TO 'u1'@'localhost' +GRANT USAGE ON *.* TO "u1"@"localhost" +GRANT SELECT, CREATE ROUTINE ON "db1".* TO "u1"@"localhost" +GRANT EXECUTE, ALTER ROUTINE ON PACKAGE "db1"."pkg2" TO "u1"@"localhost" DROP PACKAGE pkg2; SHOW GRANTS; Grants for u1@localhost -GRANT USAGE ON *.* TO 'u1'@'localhost' -GRANT SELECT, CREATE ROUTINE ON "db1".* TO 'u1'@'localhost' +GRANT USAGE ON *.* TO "u1"@"localhost" +GRANT SELECT, CREATE ROUTINE ON "db1".* TO "u1"@"localhost" # # Now u1 can also CREATE, DROP package bodies and EXECUTE package body routines # @@ -184,9 +184,9 @@ FUNCTION f1 RETURN TEXT AS BEGIN RETURN 'This is pkg1.f1'; END; END latin1 latin1_swedish_ci latin1_swedish_ci SHOW GRANTS; Grants for u1@localhost -GRANT USAGE ON *.* TO 'u1'@'localhost' -GRANT SELECT, CREATE ROUTINE ON "db1".* TO 'u1'@'localhost' -GRANT EXECUTE, ALTER ROUTINE ON PACKAGE BODY "db1"."pkg1" TO 'u1'@'localhost' +GRANT USAGE ON *.* TO "u1"@"localhost" +GRANT SELECT, CREATE ROUTINE ON "db1".* TO "u1"@"localhost" +GRANT EXECUTE, ALTER ROUTINE ON PACKAGE BODY "db1"."pkg1" TO "u1"@"localhost" CALL pkg1.p1; comment This is pkg1.p1 @@ -196,8 +196,8 @@ This is pkg1.f1 DROP PACKAGE BODY pkg1; SHOW GRANTS; Grants for u1@localhost -GRANT USAGE ON *.* TO 'u1'@'localhost' -GRANT SELECT, CREATE ROUTINE ON "db1".* TO 'u1'@'localhost' +GRANT USAGE ON *.* TO "u1"@"localhost" +GRANT SELECT, CREATE ROUTINE ON "db1".* TO "u1"@"localhost" # # Now create a PACKAGE BODY by root. # u1 does not have EXECUTE access by default. @@ -232,9 +232,9 @@ u1@localhost SET sql_mode=ORACLE; SHOW GRANTS; Grants for u1@localhost -GRANT USAGE ON *.* TO 'u1'@'localhost' -GRANT SELECT, CREATE ROUTINE ON "db1".* TO 'u1'@'localhost' -GRANT EXECUTE ON PACKAGE BODY "db1"."pkg1" TO 'u1'@'localhost' +GRANT USAGE ON *.* TO "u1"@"localhost" +GRANT SELECT, CREATE ROUTINE ON "db1".* TO "u1"@"localhost" +GRANT EXECUTE ON PACKAGE BODY "db1"."pkg1" TO "u1"@"localhost" CALL pkg1.p1; comment This is pkg1.p1 diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result index be235c2d4ae..9f9bf1ca4de 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result @@ -78,14 +78,14 @@ grant ALL on *.* to test_noprivs@localhost; revoke TRIGGER on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -168,12 +168,12 @@ grant ALL on *.* to test_noprivs@localhost; revoke UPDATE on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection no_privs_424a; @@ -183,7 +183,7 @@ test_noprivs@localhost use priv_db; show grants; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' select f1 from t1 order by f1; f1 insert 3.5.3.2-no @@ -209,7 +209,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg4a_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2a'; connection default; @@ -233,22 +233,22 @@ grant ALL on priv_db.* to test_noprivs@localhost; revoke UPDATE on priv_db.* from test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` connect no_privs_424b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424b; show grants; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` use priv_db; create trigger trg4b_1 before UPDATE on t1 for each row set new.f1 = 'trig 3.5.3.7-1b'; @@ -276,8 +276,8 @@ drop trigger trg4b_1; connection yes_privs_424b; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4b_2 before UPDATE on t1 for each row set new.f1 = 'trig 3.5.3.7-2b'; @@ -314,22 +314,22 @@ grant ALL on priv_db.t1 to test_noprivs@localhost; revoke UPDATE on priv_db.t1 from test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424c; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4c_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1c'; @@ -349,8 +349,8 @@ drop trigger trg4c_1; connection yes_privs_424c; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4c_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2c'; @@ -377,21 +377,21 @@ grant TRIGGER on *.* to test_noprivs@localhost; grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` connect no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424d; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4d_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1d'; @@ -412,8 +412,8 @@ drop trigger trg4d_1; connection yes_privs_424d; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4d_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2d'; @@ -441,12 +441,12 @@ grant ALL on *.* to test_noprivs@localhost; revoke SELECT on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -457,7 +457,7 @@ test_noprivs@localhost use priv_db; show grants; Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg5a_1 before INSERT on t1 for each row set @test_var = new.f1; connection default; @@ -478,7 +478,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg5a_2 before INSERT on t1 for each row set @test_var= new.f1; connection default; @@ -502,23 +502,23 @@ grant ALL on priv_db.* to test_noprivs@localhost; revoke SELECT on priv_db.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` connect no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425b; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` use priv_db; create trigger trg5b_1 before UPDATE on t1 for each row set @test_var= new.f1; @@ -537,8 +537,8 @@ drop trigger trg5b_1; connection yes_privs_425b; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5b_2 before UPDATE on t1 for each row set @test_var= new.f1; @@ -564,23 +564,23 @@ grant ALL on priv_db.t1 to test_noprivs@localhost; revoke SELECT on priv_db.t1 from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425c; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5c_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -595,8 +595,8 @@ drop trigger trg5c_1; connection yes_privs_425c; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5c_2 before INSERT on t1 for each row set @test_var= new.f1; @@ -617,23 +617,23 @@ grant TRIGGER on *.* to test_noprivs@localhost; grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425d; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5d_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -648,8 +648,8 @@ drop trigger trg5d_1; connection yes_privs_425d; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5d_2 before INSERT on t1 for each row set @test_var= new.f1; @@ -674,9 +674,9 @@ grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t2 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection yes_353x; select current_user; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result index aea34df6356..c869b5cc5bc 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result @@ -14,16 +14,16 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant select on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant select,insert on priv_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT ON `priv_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; no trigger privilege on db level for create: @@ -45,8 +45,8 @@ root@localhost grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` trigger privilege on db level for create: ----------------------------------------- @@ -96,8 +96,8 @@ root@localhost revoke TRIGGER on priv_db.* from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` no trigger privilege on db level for drop: ------------------------------------------ @@ -152,8 +152,8 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` drop trigger trg1_2; ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' @@ -182,9 +182,9 @@ create table t1 (f1 char(20)) engine= innodb; grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `no_priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `no_priv_db`.* TO `test_yesprivs`@`localhost` use db with trigger privilege on db level and without...: --------------------------------------------------------- @@ -285,13 +285,13 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie grant select, insert, update on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` grant select, update, insert on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -329,8 +329,8 @@ insert2-yes grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` trigger privilege on table level for create: -------------------------------------------- @@ -366,8 +366,8 @@ trig 1_2-yes revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` no trigger privilege on table level for drop: --------------------------------------------- @@ -421,8 +421,8 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` drop trigger trg1_2; connection no_privs; select current_user; @@ -458,15 +458,15 @@ create table t2 (f1 char(20)) engine= innodb; grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_noprivs`@`localhost` use table with trigger privilege and without...: ------------------------------------------------ @@ -543,14 +543,14 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant ALL on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant SELECT,INSERT on *.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection yes_privs; @@ -603,7 +603,7 @@ trig 1_1-yes revoke TRIGGER on *.* from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' disconnect yes_privs; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; select current_user; @@ -622,7 +622,7 @@ current_user root@localhost show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop trigger trg1_1; use priv_db; @@ -656,8 +656,8 @@ root@localhost grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` trigger privilege on db level for create: ----------------------------------------- @@ -720,7 +720,7 @@ trig 1_2-yes grant TRIGGER on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connection yes_privs; select current_user; current_user @@ -811,9 +811,9 @@ grant ALL on priv1_db.* to test_yesprivs@localhost; grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; @@ -821,9 +821,9 @@ grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost; grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO `test_noprivs`@`localhost` +GRANT SELECT, INSERT ON `priv2_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; use priv1_db; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; @@ -888,9 +888,9 @@ revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost; ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1' show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -928,10 +928,10 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` +GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost` trigger privilege on table level for create: -------------------------------------------- @@ -976,10 +976,10 @@ root@localhost grant TRIGGER on priv1_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` +GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1069,8 +1069,8 @@ grant select on priv_db.t1 to test_useprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1103,8 +1103,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1134,8 +1134,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1166,8 +1166,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1199,8 +1199,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1233,8 +1233,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1272,8 +1272,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1336,8 +1336,8 @@ grant select, insert, update ,trigger on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1379,9 +1379,9 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` WITH GRANT OPTION +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` create definer=not_ex_user@localhost trigger trg1_3 after UPDATE on t1 for each row set @var1 = 'trig 1_3-yes'; @@ -1416,8 +1416,8 @@ grant select, insert, update ,trigger on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1474,16 +1474,16 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE ON `priv_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; @@ -1539,10 +1539,10 @@ revoke UPDATE(f1) on priv_db.t2 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1691,9 +1691,9 @@ grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1734,9 +1734,9 @@ grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/is_basics_mixed.result b/mysql-test/suite/funcs_1/r/is_basics_mixed.result index 235022e3f43..95fc5ae59c3 100644 --- a/mysql-test/suite/funcs_1/r/is_basics_mixed.result +++ b/mysql-test/suite/funcs_1/r/is_basics_mixed.result @@ -128,7 +128,7 @@ CREATE USER 'testuser1'@'localhost'; GRANT ALL ON *.* TO testuser1@localhost; SHOW GRANTS FOR testuser1@localhost; Grants for testuser1@localhost -GRANT ALL PRIVILEGES ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO `testuser1`@`localhost` connect testuser1, localhost, testuser1, , test; USE information_schema; CREATE TABLE schemata ( c1 INT ); diff --git a/mysql-test/suite/funcs_1/r/is_check_constraints.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result index 4a3a2c69993..1b54135e355 100644 --- a/mysql-test/suite/funcs_1/r/is_check_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result @@ -5,8 +5,8 @@ CREATE user boo1; GRANT select,create,alter,drop on foo.* to boo1; SHOW GRANTS for boo1; Grants for boo1@% -GRANT USAGE ON *.* TO 'boo1'@'%' -GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO 'boo1'@'%' +GRANT USAGE ON *.* TO `boo1`@`%` +GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO `boo1`@`%` CREATE user boo2; create database foo; CONNECT con1,localhost, boo1,, foo; @@ -130,8 +130,8 @@ INSERT INTO t1 VALUES (1, 2), (2, 3); GRANT SELECT (a) ON t1 TO foo; SHOW GRANTS FOR foo; Grants for foo@% -GRANT USAGE ON *.* TO 'foo'@'%' -GRANT SELECT (a) ON `db`.`t1` TO 'foo'@'%' +GRANT USAGE ON *.* TO `foo`@`%` +GRANT SELECT (a) ON `db`.`t1` TO `foo`@`%` SELECT * FROM information_schema.check_constraints; CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE def db t1 CONSTRAINT_1 `b` > 0 diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result index c835864e738..b6be9118048 100644 --- a/mysql-test/suite/funcs_1/r/is_column_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result @@ -196,8 +196,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` connect testuser1, localhost, testuser1, , test; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -205,8 +205,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` connection default; GRANT SELECT (f1,f3) ON db_datadict.my_table TO 'testuser1'@'localhost'; SELECT * FROM information_schema.column_privileges @@ -217,9 +217,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -229,9 +229,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection default; ALTER TABLE db_datadict.my_table DROP COLUMN f3; GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost'; @@ -244,9 +244,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -257,9 +257,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` SELECT f1, f3 FROM db_datadict.my_table; ERROR 42S22: Unknown column 'f3' in 'field list' connection default; @@ -273,9 +273,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -286,9 +286,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection default; DROP TABLE db_datadict.my_table; SELECT * FROM information_schema.column_privileges @@ -300,9 +300,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -313,9 +313,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'testuser1'@'localhost' def db_datadict my_table f3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' -GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO `testuser1`@`localhost` connection default; REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost'; SELECT * FROM information_schema.column_privileges @@ -324,8 +324,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.column_privileges WHERE table_name = 'my_table' @@ -333,8 +333,8 @@ ORDER BY grantee, table_schema,table_name,column_name,privilege_type; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `test`.* TO `testuser1`@`localhost` connection default; disconnect testuser1; DROP USER 'testuser1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges.result b/mysql-test/suite/funcs_1/r/is_schema_privileges.result index 3daac8b2c5f..8669b2873ed 100644 --- a/mysql-test/suite/funcs_1/r/is_schema_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_schema_privileges.result @@ -124,10 +124,10 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE 'testuser1'@'localhost' def db_datadict_4 SELECT YES SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT INSERT ON `db_datadict_1`.* TO 'testuser1'@'localhost' -GRANT SELECT ON `db_datadict_4`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT INSERT ON `db_datadict_2`.`t1` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT INSERT ON `db_datadict_1`.* TO `testuser1`@`localhost` +GRANT SELECT ON `db_datadict_4`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT INSERT ON `db_datadict_2`.`t1` TO `testuser1`@`localhost` SHOW GRANTS FOR 'testuser2'@'localhost'; ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' connect testuser2, localhost, testuser2, , test; @@ -147,10 +147,10 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql' SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' -GRANT SELECT ON `db_datadict_3`.* TO 'testuser2'@'localhost' -GRANT SELECT ON `db_datadict_1`.* TO 'testuser2'@'localhost' -GRANT SELECT ON `db_datadict_4`.* TO 'testuser2'@'localhost' +GRANT USAGE ON *.* TO `testuser2`@`localhost` +GRANT SELECT ON `db_datadict_3`.* TO `testuser2`@`localhost` +GRANT SELECT ON `db_datadict_1`.* TO `testuser2`@`localhost` +GRANT SELECT ON `db_datadict_4`.* TO `testuser2`@`localhost` connection default; disconnect testuser1; disconnect testuser2; @@ -165,16 +165,16 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE 'testuser2'@'localhost' def db_datadict_4 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT INSERT ON `db_datadict_1`.* TO 'testuser1'@'localhost' -GRANT SELECT ON `db_datadict_4`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT INSERT ON `db_datadict_2`.`t1` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT INSERT ON `db_datadict_1`.* TO `testuser1`@`localhost` +GRANT SELECT ON `db_datadict_4`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT INSERT ON `db_datadict_2`.`t1` TO `testuser1`@`localhost` SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' -GRANT SELECT ON `db_datadict_3`.* TO 'testuser2'@'localhost' -GRANT SELECT ON `db_datadict_1`.* TO 'testuser2'@'localhost' -GRANT SELECT ON `db_datadict_4`.* TO 'testuser2'@'localhost' +GRANT USAGE ON *.* TO `testuser2`@`localhost` +GRANT SELECT ON `db_datadict_3`.* TO `testuser2`@`localhost` +GRANT SELECT ON `db_datadict_1`.* TO `testuser2`@`localhost` +GRANT SELECT ON `db_datadict_4`.* TO `testuser2`@`localhost` DROP USER 'testuser1'@'localhost'; DROP USER 'testuser2'@'localhost'; DROP DATABASE db_datadict_1; diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result index 419eb0b4b4c..76f3b03d018 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics.result +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -196,10 +196,10 @@ def db_datadict_2 t4 1 db_datadict_2 f2_ind 1 f2 NULL 0 NULL NULL YES HASH def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT USAGE ON *.* TO `testuser2`@`localhost` connect testuser1, localhost, testuser1, , test; SELECT * FROM information_schema.statistics WHERE table_schema LIKE 'db_datadict%' @@ -207,7 +207,7 @@ ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT INDEX_COMMENT SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` SHOW GRANTS FOR 'testuser2'@'localhost'; ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' connect testuser2, localhost, testuser2, , test; @@ -219,7 +219,7 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql' SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT USAGE ON *.* TO `testuser2`@`localhost` connection default; GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost' WITH GRANT OPTION; GRANT SELECT(f1,f5) ON db_datadict_2.t3 TO 'testuser1'@'localhost'; @@ -239,12 +239,12 @@ def db_datadict_2 t4 1 db_datadict_2 f2_ind 1 f2 NULL 0 NULL NULL YES HASH def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT ON `db_datadict`.`t1` TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT USAGE ON *.* TO `testuser2`@`localhost` connection testuser1; SELECT * FROM information_schema.statistics WHERE table_schema LIKE 'db_datadict%' @@ -258,9 +258,9 @@ def db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT ON `db_datadict`.`t1` TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` SHOW GRANTS FOR 'testuser2'@'localhost'; ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' connection testuser2; @@ -272,13 +272,13 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql' SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT USAGE ON *.* TO `testuser2`@`localhost` connection default; REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost'; SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` connection testuser1; SELECT * FROM information_schema.statistics WHERE table_schema LIKE 'db_datadict%' @@ -290,8 +290,8 @@ def db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` connection default; disconnect testuser1; disconnect testuser2; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result index d968d3b65de..a5f7b39d166 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result @@ -109,8 +109,8 @@ CREATE USER 'testuser1'@'localhost'; GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost'; SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT (f5) ON `db_datadict`.`t1` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT (f5) ON `db_datadict`.`t1` TO `testuser1`@`localhost` SELECT * FROM information_schema.table_constraints WHERE table_schema = 'db_datadict' ORDER BY table_schema,table_name, constraint_name; @@ -133,8 +133,8 @@ t2 0 PRIMARY 2 f2 ### ### ### ### ### ### ### connect testuser1, localhost, testuser1, , db_datadict; SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT (f5) ON `db_datadict`.`t1` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT (f5) ON `db_datadict`.`t1` TO `testuser1`@`localhost` SELECT * FROM information_schema.table_constraints WHERE table_schema = 'db_datadict' ORDER BY table_schema,table_name, constraint_name; diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result index 1d54ef75297..2c0942f44f1 100644 --- a/mysql-test/suite/funcs_1/r/is_table_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result @@ -84,9 +84,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser1'@'localhost' def db_datadict tb1 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT, CREATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `db_datadict`.`tb1` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT, CREATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `db_datadict`.`tb1` TO `testuser1`@`localhost` connect testuser2, localhost, testuser2, , db_datadict; SELECT * FROM information_schema.table_privileges WHERE table_name LIKE 'tb%' @@ -107,8 +107,8 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser2'@'localhost' def db_datadict tb1 UPDATE YES SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO 'testuser2'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `testuser2`@`localhost` +GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO `testuser2`@`localhost` WITH GRANT OPTION connect testuser3, localhost, testuser3, , db_datadict; SELECT * FROM information_schema.table_privileges WHERE table_name LIKE 'tb%' @@ -117,8 +117,8 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser3'@'localhost' def db_datadict tb3 SELECT NO SHOW GRANTS FOR 'testuser3'@'localhost'; Grants for testuser3@localhost -GRANT USAGE ON *.* TO 'testuser3'@'localhost' -GRANT SELECT ON `db_datadict`.`tb3` TO 'testuser3'@'localhost' +GRANT USAGE ON *.* TO `testuser3`@`localhost` +GRANT SELECT ON `db_datadict`.`tb3` TO `testuser3`@`localhost` connection default; disconnect testuser1; disconnect testuser2; @@ -144,17 +144,17 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser3'@'localhost' def db_datadict tb3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT, CREATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `db_datadict`.`tb1` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT, CREATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `db_datadict`.`tb1` TO `testuser1`@`localhost` SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO 'testuser2'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `testuser2`@`localhost` +GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO `testuser2`@`localhost` WITH GRANT OPTION SHOW GRANTS FOR 'testuser3'@'localhost'; Grants for testuser3@localhost -GRANT USAGE ON *.* TO 'testuser3'@'localhost' -GRANT SELECT ON `db_datadict`.`tb3` TO 'testuser3'@'localhost' +GRANT USAGE ON *.* TO `testuser3`@`localhost` +GRANT SELECT ON `db_datadict`.`tb3` TO `testuser3`@`localhost` DROP USER 'testuser1'@'localhost'; DROP USER 'testuser2'@'localhost'; DROP USER 'testuser3'@'localhost'; @@ -226,9 +226,9 @@ SHOW GRANTS FOR 'testuser1'@'localhost'; ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localhost' SHOW GRANTS FOR 'the_user'@'localhost'; Grants for the_user@localhost -GRANT USAGE ON *.* TO 'the_user'@'localhost' -GRANT ALL PRIVILEGES ON `test`.`t1_view` TO 'the_user'@'localhost' -GRANT ALL PRIVILEGES ON `test`.`t1_table` TO 'the_user'@'localhost' +GRANT USAGE ON *.* TO `the_user`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost` SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges WHERE table_name LIKE 't1_%' ORDER BY table_schema,table_name; @@ -246,9 +246,9 @@ test t1_table test t1_view SHOW GRANTS FOR 'the_user'@'localhost'; Grants for the_user@localhost -GRANT USAGE ON *.* TO 'the_user'@'localhost' -GRANT ALL PRIVILEGES ON `test`.`t1_view` TO 'the_user'@'localhost' -GRANT ALL PRIVILEGES ON `test`.`t1_table` TO 'the_user'@'localhost' +GRANT USAGE ON *.* TO `the_user`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost` REVOKE ALL PRIVILEGES ON test.t1_table FROM 'the_user'@'localhost'; REVOKE ALL PRIVILEGES ON test.t1_view FROM 'the_user'@'localhost'; DROP VIEW test.t1_view; diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result index 1127dc3ff44..d9ba88cba5a 100644 --- a/mysql-test/suite/funcs_1/r/is_triggers.result +++ b/mysql-test/suite/funcs_1/r/is_triggers.result @@ -145,8 +145,8 @@ trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@l connect testuser2, localhost, testuser2, , db_datadict; SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost -GRANT USAGE ON *.* TO 'testuser2'@'localhost' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, DELETE HISTORY ON `db_datadict`.`t1` TO 'testuser2'@'localhost' +GRANT USAGE ON *.* TO `testuser2`@`localhost` +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, DELETE HISTORY ON `db_datadict`.`t1` TO `testuser2`@`localhost` # No TRIGGER Privilege --> no result for query SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; @@ -156,8 +156,8 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie connect testuser3, localhost, testuser3, , test; SHOW GRANTS FOR 'testuser3'@'localhost'; Grants for testuser3@localhost -GRANT TRIGGER ON *.* TO 'testuser3'@'localhost' -GRANT SELECT ON `db_datadict`.`t1` TO 'testuser3'@'localhost' +GRANT TRIGGER ON *.* TO `testuser3`@`localhost` +GRANT SELECT ON `db_datadict`.`t1` TO `testuser3`@`localhost` # TRIGGER Privilege + SELECT Privilege on t1 --> result for query SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; @@ -169,7 +169,7 @@ trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE # testuser1@l connect testuser4, localhost, testuser4, , test; SHOW GRANTS FOR 'testuser4'@'localhost'; Grants for testuser4@localhost -GRANT TRIGGER ON *.* TO 'testuser4'@'localhost' +GRANT TRIGGER ON *.* TO `testuser4`@`localhost` # TRIGGER Privilege + no SELECT Privilege on t1 --> result for query SELECT * FROM db_datadict.t1; ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1' diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result index cb619831baa..4ef7c18d627 100644 --- a/mysql-test/suite/funcs_1/r/is_user_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result @@ -546,9 +546,9 @@ default_role max_statement_time 0.000000 SHOW GRANTS; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT SELECT, UPDATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost` # Now add SELECT on *.* to testuser1; connection default; @@ -1035,9 +1035,9 @@ default_role max_statement_time 0.000000 SHOW GRANTS; Grants for testuser1@localhost -GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT SELECT ON *.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT, UPDATE ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost` connect testuser2, localhost, testuser2, , db_datadict; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -1055,7 +1055,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user; ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'user' SHOW GRANTS; Grants for testuser2@localhost -GRANT INSERT, UPDATE ON *.* TO 'testuser2'@'localhost' +GRANT INSERT, UPDATE ON *.* TO `testuser2`@`localhost` connect testuser3, localhost, testuser3, , test; SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -1069,7 +1069,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user; ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'user' SHOW GRANTS; Grants for testuser3@localhost -GRANT USAGE ON *.* TO 'testuser3'@'localhost' +GRANT USAGE ON *.* TO `testuser3`@`localhost` # Revoke privileges from testuser1; connection default; @@ -1249,7 +1249,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user; ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' SHOW GRANTS; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` CREATE TABLE db_datadict.tb_55 ( c1 TEXT ); ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_55' SELECT * FROM information_schema.user_privileges @@ -1264,7 +1264,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user; ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' SHOW GRANTS; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_66' @@ -1587,9 +1587,9 @@ default_role max_statement_time 0.000000 SHOW GRANTS; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost` CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_56' USE db_datadict; @@ -1745,9 +1745,9 @@ default_role max_statement_time 0.000000 SHOW GRANTS; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` +GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO `testuser1`@`localhost` CREATE TABLE tb_57 ( c1 TEXT ) ENGINE = <other_engine_type>; @@ -1929,7 +1929,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user; ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' SHOW GRANTS; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` CREATE TABLE db_datadict.tb_58 ( c1 TEXT ) ENGINE = <other_engine_type>; USE db_datadict; @@ -1961,7 +1961,7 @@ PRIVILEGE_TYPE USAGE IS_GRANTABLE NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT USAGE ON *.* TO `testuser1`@`localhost` GRANT SELECT, FILE ON *.* TO 'testuser1'@'localhost'; SELECT * FROM information_schema.user_privileges WHERE grantee = '''testuser1''@''localhost'''; @@ -1975,7 +1975,7 @@ PRIVILEGE_TYPE FILE IS_GRANTABLE NO SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost -GRANT SELECT, FILE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT, FILE ON *.* TO `testuser1`@`localhost` DROP USER 'testuser1'@'localhost'; SELECT * FROM information_schema.user_privileges WHERE grantee = '''testuser1''@''localhost'''; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result index acab98b0cdc..75286115d86 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result @@ -78,14 +78,14 @@ grant ALL on *.* to test_noprivs@localhost; revoke TRIGGER on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -168,12 +168,12 @@ grant ALL on *.* to test_noprivs@localhost; revoke UPDATE on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection no_privs_424a; @@ -183,7 +183,7 @@ test_noprivs@localhost use priv_db; show grants; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' select f1 from t1 order by f1; f1 insert 3.5.3.2-no @@ -209,7 +209,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg4a_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2a'; connection default; @@ -233,22 +233,22 @@ grant ALL on priv_db.* to test_noprivs@localhost; revoke UPDATE on priv_db.* from test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` connect no_privs_424b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424b; show grants; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` use priv_db; create trigger trg4b_1 before UPDATE on t1 for each row set new.f1 = 'trig 3.5.3.7-1b'; @@ -276,8 +276,8 @@ drop trigger trg4b_1; connection yes_privs_424b; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4b_2 before UPDATE on t1 for each row set new.f1 = 'trig 3.5.3.7-2b'; @@ -314,22 +314,22 @@ grant ALL on priv_db.t1 to test_noprivs@localhost; revoke UPDATE on priv_db.t1 from test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424c; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4c_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1c'; @@ -349,8 +349,8 @@ drop trigger trg4c_1; connection yes_privs_424c; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4c_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2c'; @@ -377,21 +377,21 @@ grant TRIGGER on *.* to test_noprivs@localhost; grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` connect no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424d; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4d_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1d'; @@ -412,8 +412,8 @@ drop trigger trg4d_1; connection yes_privs_424d; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4d_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2d'; @@ -441,12 +441,12 @@ grant ALL on *.* to test_noprivs@localhost; revoke SELECT on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -457,7 +457,7 @@ test_noprivs@localhost use priv_db; show grants; Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg5a_1 before INSERT on t1 for each row set @test_var = new.f1; connection default; @@ -478,7 +478,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg5a_2 before INSERT on t1 for each row set @test_var= new.f1; connection default; @@ -502,23 +502,23 @@ grant ALL on priv_db.* to test_noprivs@localhost; revoke SELECT on priv_db.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` connect no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425b; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` use priv_db; create trigger trg5b_1 before UPDATE on t1 for each row set @test_var= new.f1; @@ -537,8 +537,8 @@ drop trigger trg5b_1; connection yes_privs_425b; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5b_2 before UPDATE on t1 for each row set @test_var= new.f1; @@ -564,23 +564,23 @@ grant ALL on priv_db.t1 to test_noprivs@localhost; revoke SELECT on priv_db.t1 from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425c; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5c_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -595,8 +595,8 @@ drop trigger trg5c_1; connection yes_privs_425c; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5c_2 before INSERT on t1 for each row set @test_var= new.f1; @@ -617,23 +617,23 @@ grant TRIGGER on *.* to test_noprivs@localhost; grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425d; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5d_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -648,8 +648,8 @@ drop trigger trg5d_1; connection yes_privs_425d; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5d_2 before INSERT on t1 for each row set @test_var= new.f1; @@ -674,9 +674,9 @@ grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t2 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection yes_353x; select current_user; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result index b1c017d368b..72c269cb89a 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result @@ -15,16 +15,16 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant select on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant select,insert on priv_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT ON `priv_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; no trigger privilege on db level for create: @@ -46,8 +46,8 @@ root@localhost grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` trigger privilege on db level for create: ----------------------------------------- @@ -97,8 +97,8 @@ root@localhost revoke TRIGGER on priv_db.* from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` no trigger privilege on db level for drop: ------------------------------------------ @@ -153,8 +153,8 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` drop trigger trg1_2; ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' @@ -183,9 +183,9 @@ create table t1 (f1 char(20)) engine= memory; grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `no_priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `no_priv_db`.* TO `test_yesprivs`@`localhost` use db with trigger privilege on db level and without...: --------------------------------------------------------- @@ -286,13 +286,13 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie grant select, insert, update on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` grant select, update, insert on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -330,8 +330,8 @@ insert2-yes grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` trigger privilege on table level for create: -------------------------------------------- @@ -367,8 +367,8 @@ trig 1_2-yes revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` no trigger privilege on table level for drop: --------------------------------------------- @@ -422,8 +422,8 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` drop trigger trg1_2; connection no_privs; select current_user; @@ -459,15 +459,15 @@ create table t2 (f1 char(20)) engine= memory; grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_noprivs`@`localhost` use table with trigger privilege and without...: ------------------------------------------------ @@ -544,14 +544,14 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant ALL on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant SELECT,INSERT on *.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection yes_privs; @@ -604,7 +604,7 @@ trig 1_1-yes revoke TRIGGER on *.* from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' disconnect yes_privs; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; select current_user; @@ -623,7 +623,7 @@ current_user root@localhost show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop trigger trg1_1; use priv_db; @@ -657,8 +657,8 @@ root@localhost grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` trigger privilege on db level for create: ----------------------------------------- @@ -721,7 +721,7 @@ trig 1_2-yes grant TRIGGER on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connection yes_privs; select current_user; current_user @@ -812,9 +812,9 @@ grant ALL on priv1_db.* to test_yesprivs@localhost; grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; @@ -822,9 +822,9 @@ grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost; grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO `test_noprivs`@`localhost` +GRANT SELECT, INSERT ON `priv2_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; use priv1_db; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; @@ -889,9 +889,9 @@ revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost; ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1' show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -929,10 +929,10 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` +GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost` trigger privilege on table level for create: -------------------------------------------- @@ -977,10 +977,10 @@ root@localhost grant TRIGGER on priv1_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` +GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1070,8 +1070,8 @@ grant select on priv_db.t1 to test_useprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1104,8 +1104,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1135,8 +1135,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1167,8 +1167,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1200,8 +1200,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1234,8 +1234,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1273,8 +1273,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1337,8 +1337,8 @@ grant select, insert, update ,trigger on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1380,9 +1380,9 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` WITH GRANT OPTION +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` create definer=not_ex_user@localhost trigger trg1_3 after UPDATE on t1 for each row set @var1 = 'trig 1_3-yes'; @@ -1413,16 +1413,16 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE ON `priv_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; @@ -1478,10 +1478,10 @@ revoke UPDATE(f1) on priv_db.t2 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1630,9 +1630,9 @@ grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1673,9 +1673,9 @@ grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result index acab98b0cdc..75286115d86 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result @@ -78,14 +78,14 @@ grant ALL on *.* to test_noprivs@localhost; revoke TRIGGER on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -168,12 +168,12 @@ grant ALL on *.* to test_noprivs@localhost; revoke UPDATE on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER, UPDATE on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect no_privs_424a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection no_privs_424a; @@ -183,7 +183,7 @@ test_noprivs@localhost use priv_db; show grants; Grants for test_noprivs@localhost -GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' select f1 from t1 order by f1; f1 insert 3.5.3.2-no @@ -209,7 +209,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg4a_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2a'; connection default; @@ -233,22 +233,22 @@ grant ALL on priv_db.* to test_noprivs@localhost; revoke UPDATE on priv_db.* from test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` connect no_privs_424b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424b; show grants; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` use priv_db; create trigger trg4b_1 before UPDATE on t1 for each row set new.f1 = 'trig 3.5.3.7-1b'; @@ -276,8 +276,8 @@ drop trigger trg4b_1; connection yes_privs_424b; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4b_2 before UPDATE on t1 for each row set new.f1 = 'trig 3.5.3.7-2b'; @@ -314,22 +314,22 @@ grant ALL on priv_db.t1 to test_noprivs@localhost; revoke UPDATE on priv_db.t1 from test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs_424c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424c; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4c_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1c'; @@ -349,8 +349,8 @@ drop trigger trg4c_1; connection yes_privs_424c; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4c_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2c'; @@ -377,21 +377,21 @@ grant TRIGGER on *.* to test_noprivs@localhost; grant SELECT (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant UPDATE (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs; Grants for test_noprivs@% -GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' +GRANT TRIGGER ON *.* TO `test_noprivs`@`%` connect no_privs_424d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_424d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_424d; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg4d_1 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-1d'; @@ -412,8 +412,8 @@ drop trigger trg4d_1; connection yes_privs_424d; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg4d_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2d'; @@ -441,12 +441,12 @@ grant ALL on *.* to test_noprivs@localhost; revoke SELECT on *.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER, SELECT on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect no_privs_425a,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425a,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; @@ -457,7 +457,7 @@ test_noprivs@localhost use priv_db; show grants; Grants for test_noprivs@localhost -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg5a_1 before INSERT on t1 for each row set @test_var = new.f1; connection default; @@ -478,7 +478,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create trigger trg5a_2 before INSERT on t1 for each row set @test_var= new.f1; connection default; @@ -502,23 +502,23 @@ grant ALL on priv_db.* to test_noprivs@localhost; revoke SELECT on priv_db.* from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` connect no_privs_425b,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425b,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425b; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `priv_db`.* TO `test_noprivs`@`localhost` use priv_db; create trigger trg5b_1 before UPDATE on t1 for each row set @test_var= new.f1; @@ -537,8 +537,8 @@ drop trigger trg5b_1; connection yes_privs_425b; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5b_2 before UPDATE on t1 for each row set @test_var= new.f1; @@ -564,23 +564,23 @@ grant ALL on priv_db.t1 to test_noprivs@localhost; revoke SELECT on priv_db.t1 from test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect no_privs_425c,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425c,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425c; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER, DELETE HISTORY ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5c_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -595,8 +595,8 @@ drop trigger trg5c_1; connection yes_privs_425c; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5c_2 before INSERT on t1 for each row set @test_var= new.f1; @@ -617,23 +617,23 @@ grant TRIGGER on *.* to test_noprivs@localhost; grant UPDATE (f1), INSERT (f1) on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on *.* to test_yesprivs@localhost; grant SELECT (f1) on priv_db.t1 to test_yesprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connect no_privs_425d,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect yes_privs_425d,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection default; connection no_privs_425d; show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO `test_noprivs`@`localhost` use priv_db; create trigger trg5d_1 before INSERT on t1 for each row set @test_var= new.f1; @@ -648,8 +648,8 @@ drop trigger trg5d_1; connection yes_privs_425d; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` use priv_db; create trigger trg5d_2 before INSERT on t1 for each row set @test_var= new.f1; @@ -674,9 +674,9 @@ grant SELECT, UPDATE on priv_db.t1 to test_yesprivs@localhost; grant SELECT on priv_db.t2 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT TRIGGER ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connect yes_353x,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection yes_353x; select current_user; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result index 8a42a54b1be..8b8df4bd694 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result @@ -15,16 +15,16 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant select on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT ON `priv_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant select,insert on priv_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT ON `priv_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; no trigger privilege on db level for create: @@ -46,8 +46,8 @@ root@localhost grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` trigger privilege on db level for create: ----------------------------------------- @@ -97,8 +97,8 @@ root@localhost revoke TRIGGER on priv_db.* from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE ON `priv_db`.* TO `test_yesprivs`@`localhost` no trigger privilege on db level for drop: ------------------------------------------ @@ -153,8 +153,8 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` drop trigger trg1_2; ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' @@ -183,9 +183,9 @@ create table t1 (f1 char(20)) engine= myisam; grant SELECT,UPDATE on no_priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `no_priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `no_priv_db`.* TO `test_yesprivs`@`localhost` use db with trigger privilege on db level and without...: --------------------------------------------------------- @@ -286,13 +286,13 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie grant select, insert, update on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` grant select, update, insert on priv_db.t1 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -330,8 +330,8 @@ insert2-yes grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` trigger privilege on table level for create: -------------------------------------------- @@ -367,8 +367,8 @@ trig 1_2-yes revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` no trigger privilege on table level for drop: --------------------------------------------- @@ -422,8 +422,8 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` drop trigger trg1_2; connection no_privs; select current_user; @@ -459,15 +459,15 @@ create table t2 (f1 char(20)) engine= myisam; grant SELECT, INSERT, UPDATE on priv_db.t2 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` grant SELECT, INSERT, UPDATE on priv_db.t2 to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_noprivs`@`localhost` +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t2` TO `test_noprivs`@`localhost` use table with trigger privilege and without...: ------------------------------------------------ @@ -544,14 +544,14 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant ALL on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant SELECT,INSERT on *.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT SELECT, INSERT ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connection yes_privs; @@ -604,7 +604,7 @@ trig 1_1-yes revoke TRIGGER on *.* from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' disconnect yes_privs; connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; select current_user; @@ -623,7 +623,7 @@ current_user root@localhost show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION drop trigger trg1_1; use priv_db; @@ -657,8 +657,8 @@ root@localhost grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, CREATE TABLESPACE, DELETE HISTORY ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` trigger privilege on db level for create: ----------------------------------------- @@ -721,7 +721,7 @@ trig 1_2-yes grant TRIGGER on *.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT ALL PRIVILEGES ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' connection yes_privs; select current_user; current_user @@ -812,9 +812,9 @@ grant ALL on priv1_db.* to test_yesprivs@localhost; grant SELECT,UPDATE on priv2_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; @@ -822,9 +822,9 @@ grant SELECT,INSERT,UPDATE on priv1_db.* to test_noprivs@localhost; grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO 'test_noprivs'@'localhost' -GRANT SELECT, INSERT ON `priv2_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv1_db`.* TO `test_noprivs`@`localhost` +GRANT SELECT, INSERT ON `priv2_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; use priv1_db; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; @@ -889,9 +889,9 @@ revoke TRIGGER on priv1_db.t1 from test_yesprivs@localhost; ERROR 42000: There is no such grant defined for user 'test_yesprivs' on host 'localhost' on table 't1' show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -929,10 +929,10 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie grant TRIGGER on priv1_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, DELETE HISTORY ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` +GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost` trigger privilege on table level for create: -------------------------------------------- @@ -977,10 +977,10 @@ root@localhost grant TRIGGER on priv1_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT ALL PRIVILEGES ON `priv1_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT, UPDATE ON `priv2_db`.* TO 'test_yesprivs'@'localhost' -GRANT TRIGGER ON `priv1_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT ALL PRIVILEGES ON `priv1_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT, UPDATE ON `priv2_db`.* TO `test_yesprivs`@`localhost` +GRANT TRIGGER ON `priv1_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1070,8 +1070,8 @@ grant select on priv_db.t1 to test_useprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1104,8 +1104,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1135,8 +1135,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1167,8 +1167,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1200,8 +1200,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1234,8 +1234,8 @@ root@localhost revoke TRIGGER on priv_db.t1 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1273,8 +1273,8 @@ root@localhost grant TRIGGER on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' WITH GRANT OPTION +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` WITH GRANT OPTION connection yes_privs; select current_user; current_user @@ -1337,8 +1337,8 @@ grant select, insert, update ,trigger on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1380,9 +1380,9 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION -GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` WITH GRANT OPTION +GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` create definer=not_ex_user@localhost trigger trg1_3 after UPDATE on t1 for each row set @var1 = 'trig 1_3-yes'; @@ -1413,16 +1413,16 @@ revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost; grant TRIGGER on priv_db.* to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` create User test_noprivs@localhost; set password for test_noprivs@localhost = password('PWD'); revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost; grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost; show grants for test_noprivs@localhost; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT, UPDATE ON `priv_db`.* TO 'test_noprivs'@'localhost' +GRANT USAGE ON *.* TO `test_noprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, UPDATE ON `priv_db`.* TO `test_noprivs`@`localhost` connect yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK; @@ -1478,10 +1478,10 @@ revoke UPDATE(f1) on priv_db.t2 from test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost` +GRANT SELECT (f1), INSERT ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT (f1), INSERT, UPDATE (f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1630,9 +1630,9 @@ grant TRIGGER,UPDATE(f2),UPDATE(f3) on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2), TRIGGER ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection yes_privs; select current_user; current_user @@ -1673,9 +1673,9 @@ grant UPDATE(f1),UPDATE(f2),UPDATE(f3) on priv_db.t1 to test_yesprivs@localhost; show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' -GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO 'test_yesprivs'@'localhost' -GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' +GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT (f1), INSERT, UPDATE ON `priv_db`.`t2` TO `test_yesprivs`@`localhost` +GRANT SELECT, SELECT (f1), INSERT, UPDATE (f3, f2, f1) ON `priv_db`.`t1` TO `test_yesprivs`@`localhost` connection no_privs; select current_user; current_user diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result index 5dd432714ab..f3f561fd479 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result @@ -74,7 +74,7 @@ GRANT INSERT,UPDATE ON processlist TO current_user; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' SHOW GRANTS; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION CREATE INDEX i_processlist ON processlist (user); ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' @@ -151,7 +151,7 @@ GRANT INSERT,UPDATE ON processlist TO current_user; ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' CREATE INDEX i_processlist ON processlist (user); ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' DROP TABLE processlist; @@ -187,7 +187,7 @@ SHOW/SELECT shows only the processes (1) of the user. connection con100; SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS @@ -201,7 +201,7 @@ SHOW/SELECT shows all processes/threads. connect con101,localhost,ddicttestuser1,ddictpass,information_schema; SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -227,7 +227,7 @@ SHOW/SELECT shows all processes/threads. connect anonymous1,localhost,"''",,information_schema; SHOW GRANTS; Grants for @localhost -GRANT PROCESS ON *.* TO ''@'localhost' +GRANT PROCESS ON *.* TO ``@`localhost` SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -254,7 +254,7 @@ ddicttestuser1 are visible. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -279,7 +279,7 @@ Again only the processes of the anonymous user are visible. #################################################################################### SHOW GRANTS FOR ''@'localhost'; Grants for @localhost -GRANT USAGE ON *.* TO ''@'localhost' +GRANT USAGE ON *.* TO ``@`localhost` SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -297,7 +297,7 @@ Only the processes of ddicttestuser1 user are visible. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -324,7 +324,7 @@ Only the processes of ddicttestuser1 are visible. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -352,7 +352,7 @@ Try to grant PROCESS privilege to user ddicttestuser2 without having it. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION +GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES) #################################################################################### @@ -368,7 +368,7 @@ Grant PROCESS privilege to user ddicttestuser2 #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT PROCESS, SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION +GRANT PROCESS, SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; #################################################################################### 10.4 New connection con200 (ddicttestuser2 with PROCESS privilege) @@ -377,7 +377,7 @@ ddicttestuser2 has now the PROCESS privilege and sees all connections #################################################################################### SHOW GRANTS FOR 'ddicttestuser2'@'localhost'; Grants for ddicttestuser2@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -417,7 +417,7 @@ ddicttestuser2 has no more the PROCESS privilege and can only see own connects #################################################################################### SHOW GRANTS; Grants for ddicttestuser2@localhost -GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -440,7 +440,7 @@ He is also unable to GRANT the PROCESS privilege to ddicttestuser2 #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES) SHOW processlist; @@ -479,7 +479,7 @@ Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result index 6ade94dbe58..a68e62e4642 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result @@ -74,7 +74,7 @@ GRANT INSERT,UPDATE ON processlist TO current_user; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' SHOW GRANTS; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION CREATE INDEX i_processlist ON processlist (user); ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' @@ -151,7 +151,7 @@ GRANT INSERT,UPDATE ON processlist TO current_user; ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' CREATE INDEX i_processlist ON processlist (user); ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' DROP TABLE processlist; @@ -187,7 +187,7 @@ SHOW/SELECT shows only the processes (1) of the user. connection con100; SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS @@ -201,7 +201,7 @@ SHOW/SELECT shows all processes/threads. connect con101,localhost,ddicttestuser1,ddictpass,information_schema; SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -227,7 +227,7 @@ SHOW/SELECT shows all processes/threads. connect anonymous1,localhost,"''",,information_schema; SHOW GRANTS; Grants for @localhost -GRANT PROCESS ON *.* TO ''@'localhost' +GRANT PROCESS ON *.* TO ``@`localhost` SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -254,7 +254,7 @@ ddicttestuser1 are visible. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -279,7 +279,7 @@ Again only the processes of the anonymous user are visible. #################################################################################### SHOW GRANTS FOR ''@'localhost'; Grants for @localhost -GRANT USAGE ON *.* TO ''@'localhost' +GRANT USAGE ON *.* TO ``@`localhost` SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -297,7 +297,7 @@ Only the processes of ddicttestuser1 user are visible. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -324,7 +324,7 @@ Only the processes of ddicttestuser1 are visible. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -352,7 +352,7 @@ Try to grant PROCESS privilege to user ddicttestuser2 without having it. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION +GRANT SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES) #################################################################################### @@ -368,7 +368,7 @@ Grant PROCESS privilege to user ddicttestuser2 #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT PROCESS, SUPER ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION +GRANT PROCESS, SUPER ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' WITH GRANT OPTION GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; #################################################################################### 10.4 New connection con200 (ddicttestuser2 with PROCESS privilege) @@ -377,7 +377,7 @@ ddicttestuser2 has now the PROCESS privilege and sees all connections #################################################################################### SHOW GRANTS FOR 'ddicttestuser2'@'localhost'; Grants for ddicttestuser2@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -417,7 +417,7 @@ ddicttestuser2 has no more the PROCESS privilege and can only see own connects #################################################################################### SHOW GRANTS; Grants for ddicttestuser2@localhost -GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS @@ -440,7 +440,7 @@ He is also unable to GRANT the PROCESS privilege to ddicttestuser2 #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES) SHOW processlist; @@ -479,7 +479,7 @@ Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format.result b/mysql-test/suite/galera/r/galera_forced_binlog_format.result index 2a31893ca1d..3653a311d83 100644 --- a/mysql-test/suite/galera/r/galera_forced_binlog_format.result +++ b/mysql-test/suite/galera/r/galera_forced_binlog_format.result @@ -36,8 +36,8 @@ GRANT ALL PRIVILEGES ON testdb_9401.t1 TO dummy@localhost; FLUSH PRIVILEGES; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO 'dummy'@'localhost' -GRANT ALL PRIVILEGES ON `testdb_9401`.`t1` TO 'dummy'@'localhost' +GRANT USAGE ON *.* TO `dummy`@`localhost` +GRANT ALL PRIVILEGES ON `testdb_9401`.`t1` TO `dummy`@`localhost` REVOKE ALL PRIVILEGES, GRANT OPTION FROM dummy@localhost; DROP USER dummy@localhost; DROP DATABASE testdb_9401; diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result index bef89acfc92..7d6c57e8131 100644 --- a/mysql-test/suite/galera/r/galera_roles.result +++ b/mysql-test/suite/galera/r/galera_roles.result @@ -26,8 +26,8 @@ connect foo_node_2,127.0.0.1,foo,,test,$port_2,; connection foo_node_1; SHOW GRANTS; Grants for foo@localhost -GRANT role1 TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT `role1` TO `foo`@`localhost` +GRANT USAGE ON *.* TO `foo`@`localhost` FLUSH TABLES; ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation SELECT * FROM mysql.roles_mapping; @@ -62,8 +62,8 @@ pr1 connection foo_node_2; SHOW GRANTS; Grants for foo@localhost -GRANT role1 TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT `role1` TO `foo`@`localhost` +GRANT USAGE ON *.* TO `foo`@`localhost` FLUSH TABLES; ERROR 42000: Access denied; you need (at least one of) the RELOAD privilege(s) for this operation SELECT * FROM mysql.roles_mapping; @@ -129,7 +129,7 @@ SELECT a FROM test1.t2; ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2' SHOW GRANTS; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` SELECT * FROM INFORMATION_SCHEMA.ENABLED_ROLES; ROLE_NAME NULL @@ -151,7 +151,7 @@ SELECT a FROM test1.t2; ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2' SHOW GRANTS; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` SELECT * FROM INFORMATION_SCHEMA.ENABLED_ROLES; ROLE_NAME NULL diff --git a/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result b/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result index 03ef0ed2c09..2e31fc57dd4 100644 --- a/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result +++ b/mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result @@ -10,8 +10,8 @@ current_user() test1@localhost SHOW GRANTS FOR CURRENT_USER; Grants for test1@localhost -GRANT USAGE ON *.* TO 'test1'@'localhost' -GRANT SELECT, INSERT, CREATE, DROP ON `test`.* TO 'test1'@'localhost' +GRANT USAGE ON *.* TO `test1`@`localhost` +GRANT SELECT, INSERT, CREATE, DROP ON `test`.* TO `test1`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table 'tp' disconnect test1; @@ -22,8 +22,8 @@ current_user() test2@localhost SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, INSERT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, INSERT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO `test2`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; SELECT * FROM t_10; a b @@ -80,8 +80,8 @@ current_user() test2@localhost SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, INSERT, UPDATE, CREATE, DROP ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, INSERT, UPDATE, CREATE, DROP ON `test`.* TO `test2`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp' SELECT * FROM tp WHERE a BETWEEN 0 AND 10; diff --git a/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result b/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result index 03ef0ed2c09..2e31fc57dd4 100644 --- a/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result +++ b/mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result @@ -10,8 +10,8 @@ current_user() test1@localhost SHOW GRANTS FOR CURRENT_USER; Grants for test1@localhost -GRANT USAGE ON *.* TO 'test1'@'localhost' -GRANT SELECT, INSERT, CREATE, DROP ON `test`.* TO 'test1'@'localhost' +GRANT USAGE ON *.* TO `test1`@`localhost` +GRANT SELECT, INSERT, CREATE, DROP ON `test`.* TO `test1`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR 42000: ALTER command denied to user 'test1'@'localhost' for table 'tp' disconnect test1; @@ -22,8 +22,8 @@ current_user() test2@localhost SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, INSERT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, INSERT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO `test2`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; SELECT * FROM t_10; a b @@ -80,8 +80,8 @@ current_user() test2@localhost SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, INSERT, UPDATE, CREATE, DROP ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, INSERT, UPDATE, CREATE, DROP ON `test`.* TO `test2`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR 42000: ALTER command denied to user 'test2'@'localhost' for table 'tp' SELECT * FROM tp WHERE a BETWEEN 0 AND 10; diff --git a/mysql-test/suite/parts/r/partition_exch_qa_6.result b/mysql-test/suite/parts/r/partition_exch_qa_6.result index 6de40ee614a..880886b4fac 100644 --- a/mysql-test/suite/parts/r/partition_exch_qa_6.result +++ b/mysql-test/suite/parts/r/partition_exch_qa_6.result @@ -59,8 +59,8 @@ GRANT CREATE, DROP, ALTER, UPDATE, INSERT, SELECT ON test.* TO test2@localhost; connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK; SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, INSERT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, INSERT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO `test2`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; SELECT * FROM t_10; a b @@ -114,8 +114,8 @@ connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK; USE test; SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, UPDATE, CREATE, DROP, ALTER ON `test`.* TO `test2`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR 42000: INSERT command denied to user 'test2'@'localhost' for table 'tp' disconnect test2; @@ -126,8 +126,8 @@ connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK; USE test; SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, INSERT, UPDATE, DROP, ALTER ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, INSERT, UPDATE, DROP, ALTER ON `test`.* TO `test2`@`localhost` ALTER TABLE tsp EXCHANGE PARTITION sp00 WITH TABLE tsp_00; ERROR 42000: CREATE command denied to user 'test2'@'localhost' for table 'tsp' disconnect test2; @@ -137,8 +137,8 @@ REVOKE DROP ON test.* FROM test2@localhost; connect test2,localhost,test2,,test,$MASTER_MYPORT,$MASTER_MYSOCK; SHOW GRANTS FOR CURRENT_USER; Grants for test2@localhost -GRANT USAGE ON *.* TO 'test2'@'localhost' -GRANT SELECT, INSERT, UPDATE, CREATE, ALTER ON `test`.* TO 'test2'@'localhost' +GRANT USAGE ON *.* TO `test2`@`localhost` +GRANT SELECT, INSERT, UPDATE, CREATE, ALTER ON `test`.* TO `test2`@`localhost` ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t_10; ERROR 42000: DROP command denied to user 'test2'@'localhost' for table 'tp' disconnect test2; diff --git a/mysql-test/suite/perfschema/r/column_privilege.result b/mysql-test/suite/perfschema/r/column_privilege.result index f88a5615e16..b8fff059240 100644 --- a/mysql-test/suite/perfschema/r/column_privilege.result +++ b/mysql-test/suite/perfschema/r/column_privilege.result @@ -1,6 +1,6 @@ show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION create user 'pfs_user_5'@localhost; grant usage on *.* to 'pfs_user_5'@localhost with GRANT OPTION; diff --git a/mysql-test/suite/perfschema/r/privilege.result b/mysql-test/suite/perfschema/r/privilege.result index 7bb7627142e..0a038000536 100644 --- a/mysql-test/suite/perfschema/r/privilege.result +++ b/mysql-test/suite/perfschema/r/privilege.result @@ -1,6 +1,6 @@ show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION create user 'pfs_user_1'@localhost; create user 'pfs_user_2'@localhost; diff --git a/mysql-test/suite/perfschema/r/read_only.result b/mysql-test/suite/perfschema/r/read_only.result index 045e3232fda..32e3a724b5e 100644 --- a/mysql-test/suite/perfschema/r/read_only.result +++ b/mysql-test/suite/perfschema/r/read_only.result @@ -12,8 +12,8 @@ select @@global.read_only; 0 show grants; Grants for pfsuser@localhost -GRANT USAGE ON *.* TO 'pfsuser'@'localhost' -GRANT SELECT, UPDATE ON `performance_schema`.* TO 'pfsuser'@'localhost' +GRANT USAGE ON *.* TO `pfsuser`@`localhost` +GRANT SELECT, UPDATE ON `performance_schema`.* TO `pfsuser`@`localhost` select * from performance_schema.setup_instruments; update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; @@ -25,8 +25,8 @@ select @@global.read_only; 1 show grants; Grants for pfsuser@localhost -GRANT USAGE ON *.* TO 'pfsuser'@'localhost' -GRANT SELECT, UPDATE ON `performance_schema`.* TO 'pfsuser'@'localhost' +GRANT USAGE ON *.* TO `pfsuser`@`localhost` +GRANT SELECT, UPDATE ON `performance_schema`.* TO `pfsuser`@`localhost` select * from performance_schema.setup_instruments; update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; @@ -40,8 +40,8 @@ select @@global.read_only; 1 show grants; Grants for pfsuser@localhost -GRANT SUPER ON *.* TO 'pfsuser'@'localhost' -GRANT SELECT, UPDATE ON `performance_schema`.* TO 'pfsuser'@'localhost' +GRANT SUPER ON *.* TO `pfsuser`@`localhost` +GRANT SELECT, UPDATE ON `performance_schema`.* TO `pfsuser`@`localhost` select * from performance_schema.setup_instruments; update performance_schema.setup_instruments set enabled='NO'; update performance_schema.setup_instruments set enabled='YES'; diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result index 4785bef3ef7..7ae385b79cb 100644 --- a/mysql-test/suite/plugins/r/auth_ed25519.result +++ b/mysql-test/suite/plugins/r/auth_ed25519.result @@ -37,7 +37,7 @@ PLUGIN_AUTH_VERSION 1.0 create user test1@localhost identified via ed25519 using 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'; show grants for test1@localhost; Grants for test1@localhost -GRANT USAGE ON *.* TO 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY' +GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY' connect(localhost,test1,public,test,PORT,SOCKET); connect con1, localhost, test1, public; ERROR 28000: Access denied for user 'test1'@'localhost' (using password: YES) diff --git a/mysql-test/suite/roles/admin.result b/mysql-test/suite/roles/admin.result index 87d2888b47c..a7841fd3b57 100644 --- a/mysql-test/suite/roles/admin.result +++ b/mysql-test/suite/roles/admin.result @@ -27,22 +27,22 @@ grant select on *.* to foo@localhost with admin option; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'admin option' at line 1 show grants for foo@localhost; Grants for foo@localhost -GRANT CREATE USER ON *.* TO 'foo'@'localhost' -GRANT role1 TO 'foo'@'localhost' WITH ADMIN OPTION -GRANT role2 TO 'foo'@'localhost' -GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION +GRANT CREATE USER ON *.* TO `foo`@`localhost` +GRANT `role1` TO `foo`@`localhost` WITH ADMIN OPTION +GRANT `role2` TO `foo`@`localhost` +GRANT `role5` TO `foo`@`localhost` WITH ADMIN OPTION show grants for role1; Grants for role1 -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT role2 TO 'role1' -GRANT role3 TO 'role1' WITH ADMIN OPTION -GRANT role4 TO 'role3' WITH ADMIN OPTION +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT `role2` TO `role1` +GRANT `role3` TO `role1` WITH ADMIN OPTION +GRANT `role4` TO `role3` WITH ADMIN OPTION show grants for role4; Grants for role4 -GRANT USAGE ON *.* TO 'role4' +GRANT USAGE ON *.* TO `role4` select * from mysql.roles_mapping; Host User Role Admin_option role1 role2 N @@ -58,22 +58,22 @@ localhost root role4 Y flush privileges; show grants for foo@localhost; Grants for foo@localhost -GRANT CREATE USER ON *.* TO 'foo'@'localhost' -GRANT role1 TO 'foo'@'localhost' WITH ADMIN OPTION -GRANT role2 TO 'foo'@'localhost' -GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION +GRANT CREATE USER ON *.* TO `foo`@`localhost` +GRANT `role1` TO `foo`@`localhost` WITH ADMIN OPTION +GRANT `role2` TO `foo`@`localhost` +GRANT `role5` TO `foo`@`localhost` WITH ADMIN OPTION show grants for role1; Grants for role1 -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT role2 TO 'role1' -GRANT role3 TO 'role1' WITH ADMIN OPTION -GRANT role4 TO 'role3' WITH ADMIN OPTION +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT `role2` TO `role1` +GRANT `role3` TO `role1` WITH ADMIN OPTION +GRANT `role4` TO `role3` WITH ADMIN OPTION show grants for role4; Grants for role4 -GRANT USAGE ON *.* TO 'role4' +GRANT USAGE ON *.* TO `role4` select * from information_schema.applicable_roles; GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT role1 role2 NO NULL @@ -89,21 +89,21 @@ revoke admin option for role2 from foo@localhost; revoke admin option for role1 from root@localhost; show grants for foo@localhost; Grants for foo@localhost -GRANT CREATE USER ON *.* TO 'foo'@'localhost' -GRANT role2 TO 'foo'@'localhost' -GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION +GRANT CREATE USER ON *.* TO `foo`@`localhost` +GRANT `role2` TO `foo`@`localhost` +GRANT `role5` TO `foo`@`localhost` WITH ADMIN OPTION show grants for role1; Grants for role1 -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT role2 TO 'role1' WITH ADMIN OPTION -GRANT role3 TO 'role1' WITH ADMIN OPTION -GRANT role4 TO 'role3' +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT `role2` TO `role1` WITH ADMIN OPTION +GRANT `role3` TO `role1` WITH ADMIN OPTION +GRANT `role4` TO `role3` show grants for role4; Grants for role4 -GRANT USAGE ON *.* TO 'role4' +GRANT USAGE ON *.* TO `role4` select * from mysql.roles_mapping; Host User Role Admin_option role1 role2 Y @@ -118,21 +118,21 @@ localhost root role4 Y flush privileges; show grants for foo@localhost; Grants for foo@localhost -GRANT CREATE USER ON *.* TO 'foo'@'localhost' -GRANT role2 TO 'foo'@'localhost' -GRANT role5 TO 'foo'@'localhost' WITH ADMIN OPTION +GRANT CREATE USER ON *.* TO `foo`@`localhost` +GRANT `role2` TO `foo`@`localhost` +GRANT `role5` TO `foo`@`localhost` WITH ADMIN OPTION show grants for role1; Grants for role1 -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT role2 TO 'role1' WITH ADMIN OPTION -GRANT role3 TO 'role1' WITH ADMIN OPTION -GRANT role4 TO 'role3' +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT `role2` TO `role1` WITH ADMIN OPTION +GRANT `role3` TO `role1` WITH ADMIN OPTION +GRANT `role4` TO `role3` show grants for role4; Grants for role4 -GRANT USAGE ON *.* TO 'role4' +GRANT USAGE ON *.* TO `role4` select * from information_schema.applicable_roles; GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT role1 role2 YES NULL diff --git a/mysql-test/suite/roles/create_and_drop_role.result b/mysql-test/suite/roles/create_and_drop_role.result index a163ee82f42..ad0561aed4d 100644 --- a/mysql-test/suite/roles/create_and_drop_role.result +++ b/mysql-test/suite/roles/create_and_drop_role.result @@ -66,8 +66,8 @@ localhost r1 r2 N localhost root r2 Y SHOW GRANTS FOR r1@localhost; Grants for r1@localhost -GRANT r2 TO 'r1'@'localhost' -GRANT USAGE ON *.* TO 'r1'@'localhost' +GRANT `r2` TO `r1`@`localhost` +GRANT USAGE ON *.* TO `r1`@`localhost` DROP USER u1; DROP ROLE r2; DROP USER r1@localhost; @@ -85,5 +85,5 @@ select * from mysql.roles_mapping; Host User Role Admin_option show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION diff --git a/mysql-test/suite/roles/create_and_grant_role.result b/mysql-test/suite/roles/create_and_grant_role.result index 883ae44397d..2a676115a2d 100644 --- a/mysql-test/suite/roles/create_and_grant_role.result +++ b/mysql-test/suite/roles/create_and_grant_role.result @@ -13,14 +13,14 @@ Host User Role Admin_option localhost root r1 Y show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION -GRANT USAGE ON *.* TO 'r1' -GRANT r1 TO 'root'@'localhost' WITH ADMIN OPTION +GRANT USAGE ON *.* TO `r1` +GRANT `r1` TO `root`@`localhost` WITH ADMIN OPTION drop role r1; select * from mysql.roles_mapping; Host User Role Admin_option show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result index 0a83262add1..30911265436 100644 --- a/mysql-test/suite/roles/definer.result +++ b/mysql-test/suite/roles/definer.result @@ -38,9 +38,9 @@ connect c1, localhost, foo,,mysqltest1; connection c1; show grants; Grants for foo@localhost -GRANT role4 TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT CREATE VIEW ON `mysqltest1`.* TO 'foo'@'localhost' +GRANT `role4` TO `foo`@`localhost` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT CREATE VIEW ON `mysqltest1`.* TO `foo`@`localhost` select * from test.v1; ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them select * from test.v2; @@ -622,13 +622,13 @@ prepare stmt1 from 'grant select on *.* to utest'; execute stmt1; show grants for utest; Grants for utest@% -GRANT SELECT ON *.* TO 'utest'@'%' +GRANT SELECT ON *.* TO `utest`@`%` drop user utest; create role utest; execute stmt1; show grants for utest; Grants for utest -GRANT SELECT ON *.* TO 'utest' +GRANT SELECT ON *.* TO `utest` drop role utest; # # MDEV-13676: Field "create Procedure" is NULL, even if the the user diff --git a/mysql-test/suite/roles/drop_routines.result b/mysql-test/suite/roles/drop_routines.result index 11eda3a290f..7facb9fd1c9 100644 --- a/mysql-test/suite/roles/drop_routines.result +++ b/mysql-test/suite/roles/drop_routines.result @@ -7,15 +7,15 @@ grant r3 to r2; grant r1 to u1; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT r1 TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT `r1` TO `u1`@`%` show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT r2 TO 'r1' -GRANT r3 TO 'r2' +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT `r2` TO `r1` +GRANT `r3` TO `r2` grant SELECT on *.* to u1; grant INSERT on mysql.* to r1; grant DELETE on mysql.roles_mapping to r2; @@ -33,30 +33,30 @@ revoke execute on procedure mysql.test_proc from r2; ERROR 42000: There is no such grant defined for user 'r2' on host '' on routine 'test_proc' show grants for r1; Grants for r1 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT INSERT ON `mysql`.* TO 'r1' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT r2 TO 'r1' -GRANT r3 TO 'r2' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT INSERT ON `mysql`.* TO `r1` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT `r2` TO `r1` +GRANT `r3` TO `r2` show grants for r2; Grants for r2 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT r3 TO 'r2' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT `r3` TO `r2` show grants for r3; Grants for r3 -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r3' +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r3` drop function mysql.test_func; drop procedure mysql.test_proc; create function mysql.test_func (s CHAR(20)) @@ -64,11 +64,11 @@ returns CHAR(50) DETERMINISTIC return concat('Test string: ',s); show grants for r2; Grants for r2 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT r3 TO 'r2' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT `r3` TO `r2` connect u1,localhost,u1,,; select mysql.test_func("none"); ERROR 42000: execute command denied to user 'u1'@'%' for routine 'mysql.test_func' diff --git a/mysql-test/suite/roles/flush_roles-17898.result b/mysql-test/suite/roles/flush_roles-17898.result index ae8fb0a27d2..970c0d12195 100644 --- a/mysql-test/suite/roles/flush_roles-17898.result +++ b/mysql-test/suite/roles/flush_roles-17898.result @@ -24,15 +24,15 @@ grant select on m_.* to r2; grant r2 to r1; show grants for u1@localhost; Grants for u1@localhost -GRANT r1 TO 'u1'@'localhost' -GRANT USAGE ON *.* TO 'u1'@'localhost' +GRANT `r1` TO `u1`@`localhost` +GRANT USAGE ON *.* TO `u1`@`localhost` show grants for r1; Grants for r1 -GRANT r2 TO 'r1' -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT SELECT ON `test`.* TO 'r2' -GRANT SELECT ON `m_`.* TO 'r2' +GRANT `r2` TO `r1` +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT SELECT ON `test`.* TO `r2` +GRANT SELECT ON `m_`.* TO `r2` drop user u1@localhost; drop role r1, r2; insert mysql.db select * from db_copy; diff --git a/mysql-test/suite/roles/grant-5771.result b/mysql-test/suite/roles/grant-5771.result index 87797d8b9a4..14e033f4c29 100644 --- a/mysql-test/suite/roles/grant-5771.result +++ b/mysql-test/suite/roles/grant-5771.result @@ -21,13 +21,13 @@ show tables in mysqltest2; Tables_in_mysqltest2 show grants; Grants for foo@localhost -GRANT r2 TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT r1 TO 'r2' -GRANT USAGE ON *.* TO 'r2' -GRANT ALL PRIVILEGES ON `mysqltest2`.* TO 'r2' -GRANT USAGE ON *.* TO 'r1' -GRANT ALL PRIVILEGES ON `mysqltest1`.* TO 'r1' +GRANT `r2` TO `foo`@`localhost` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT `r1` TO `r2` +GRANT USAGE ON *.* TO `r2` +GRANT ALL PRIVILEGES ON `mysqltest2`.* TO `r2` +GRANT USAGE ON *.* TO `r1` +GRANT ALL PRIVILEGES ON `mysqltest1`.* TO `r1` connection default; drop user foo@localhost; drop role r1; diff --git a/mysql-test/suite/roles/grant_empty.result b/mysql-test/suite/roles/grant_empty.result index 3316c755b9f..2e4542993ba 100644 --- a/mysql-test/suite/roles/grant_empty.result +++ b/mysql-test/suite/roles/grant_empty.result @@ -9,8 +9,8 @@ current_user @localhost show grants; Grants for @localhost -GRANT r1 TO ''@'localhost' -GRANT USAGE ON *.* TO ''@'localhost' +GRANT `r1` TO ``@`localhost` +GRANT USAGE ON *.* TO ``@`localhost` connection default; drop role r1; drop user ''@localhost; diff --git a/mysql-test/suite/roles/grant_proxy-5526.result b/mysql-test/suite/roles/grant_proxy-5526.result index 7921969299a..8bfa8e3929c 100644 --- a/mysql-test/suite/roles/grant_proxy-5526.result +++ b/mysql-test/suite/roles/grant_proxy-5526.result @@ -3,7 +3,7 @@ create user user; grant proxy on r1 to user; show grants for user; Grants for user@% -GRANT USAGE ON *.* TO 'user'@'%' +GRANT USAGE ON *.* TO `user`@`%` GRANT PROXY ON 'r1'@'%' TO 'user'@'%' drop user user; drop role r1; diff --git a/mysql-test/suite/roles/grant_revoke_current.result b/mysql-test/suite/roles/grant_revoke_current.result index 436bec92a8f..e231a465317 100644 --- a/mysql-test/suite/roles/grant_revoke_current.result +++ b/mysql-test/suite/roles/grant_revoke_current.result @@ -14,30 +14,30 @@ r1 grant select on *.* to current_role; show grants for current_role; Grants for r1 -GRANT SELECT ON *.* TO 'r1' -GRANT INSERT ON `test`.* TO 'r1' +GRANT SELECT ON *.* TO `r1` +GRANT INSERT ON `test`.* TO `r1` revoke insert on test.* from current_role; show grants for current_role; Grants for r1 -GRANT SELECT ON *.* TO 'r1' +GRANT SELECT ON *.* TO `r1` revoke all, grant option from current_role; show grants for current_role; Grants for r1 -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` set password=password('foobar'); show grants; Grants for root@localhost -GRANT r1 TO 'root'@'localhost' WITH ADMIN OPTION -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION +GRANT `r1` TO `root`@`localhost` WITH ADMIN OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` grant r1 to current_user() identified by 'barfoo'; show grants; Grants for root@localhost -GRANT r1 TO 'root'@'localhost' WITH ADMIN OPTION -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION +GRANT `r1` TO `root`@`localhost` WITH ADMIN OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` set password=''; update mysql.user set plugin=''; drop role r1; diff --git a/mysql-test/suite/roles/ip-6401.result b/mysql-test/suite/roles/ip-6401.result index 1afd649636e..723916f9211 100644 --- a/mysql-test/suite/roles/ip-6401.result +++ b/mysql-test/suite/roles/ip-6401.result @@ -4,8 +4,8 @@ grant r1 to foo@'127.0.0.1'; connect con1,127.0.0.1,foo,,; show grants; Grants for foo@127.0.0.1 -GRANT r1 TO 'foo'@'127.0.0.1' -GRANT USAGE ON *.* TO 'foo'@'127.0.0.1' +GRANT `r1` TO `foo`@`127.0.0.1` +GRANT USAGE ON *.* TO `foo`@`127.0.0.1` set role r1; select * from information_schema.enabled_roles; ROLE_NAME diff --git a/mysql-test/suite/roles/prepare_stmt_with_role.result b/mysql-test/suite/roles/prepare_stmt_with_role.result index 0352502c35c..ecd662c7d3e 100644 --- a/mysql-test/suite/roles/prepare_stmt_with_role.result +++ b/mysql-test/suite/roles/prepare_stmt_with_role.result @@ -17,8 +17,8 @@ user host is_role developers Y SHOW GRANTS; Grants for root@localhost -GRANT developers TO 'root'@'localhost' WITH ADMIN OPTION -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT `developers` TO `root`@`localhost` WITH ADMIN OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION # Test reexecution. EXECUTE stmtCreateRole; @@ -40,8 +40,8 @@ Host User Role Admin_option localhost root developers Y SHOW GRANTS FOR test_user; Grants for test_user@% -GRANT developers TO 'test_user'@'%' -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT `developers` TO `test_user`@`%` +GRANT USAGE ON *.* TO `test_user`@`%` # # Test revoking a role. # @@ -52,16 +52,16 @@ EXECUTE stmtRevokeRole; ERROR HY000: Cannot revoke role 'developers' from: 'test_user'@'%' SHOW GRANTS FOR test_user; Grants for test_user@% -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT USAGE ON *.* TO `test_user`@`%` EXECUTE stmtGrantRole; SHOW GRANTS FOR test_user; Grants for test_user@% -GRANT developers TO 'test_user'@'%' -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT `developers` TO `test_user`@`%` +GRANT USAGE ON *.* TO `test_user`@`%` EXECUTE stmtRevokeRole; SHOW GRANTS FOR test_user; Grants for test_user@% -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT USAGE ON *.* TO `test_user`@`%` # # Now drop the role. # @@ -78,11 +78,11 @@ SELECT * FROM mysql.roles_mapping; Host User Role Admin_option SHOW GRANTS; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION SHOW GRANTS FOR test_user; Grants for test_user@% -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT USAGE ON *.* TO `test_user`@`%` # # Test reexecution. # @@ -96,12 +96,12 @@ Host User Role Admin_option localhost root developers Y SHOW GRANTS; Grants for root@localhost -GRANT developers TO 'root'@'localhost' WITH ADMIN OPTION -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT `developers` TO `root`@`localhost` WITH ADMIN OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION SHOW GRANTS FOR test_user; Grants for test_user@% -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT USAGE ON *.* TO `test_user`@`%` EXECUTE stmtDropRole; # Cleanup. DROP USER test_user; diff --git a/mysql-test/suite/roles/rebuild_role_grants.result b/mysql-test/suite/roles/rebuild_role_grants.result index 1068be9bc01..f8297d91024 100644 --- a/mysql-test/suite/roles/rebuild_role_grants.result +++ b/mysql-test/suite/roles/rebuild_role_grants.result @@ -3,16 +3,16 @@ create user u1; grant r1 to u1; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT r1 TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT `r1` TO `u1`@`%` create user u2; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT r1 TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT `r1` TO `u1`@`%` show grants for u2; Grants for u2@% -GRANT USAGE ON *.* TO 'u2'@'%' +GRANT USAGE ON *.* TO `u2`@`%` select * from mysql.roles_mapping; Host User Role Admin_option % u1 r1 N @@ -22,7 +22,7 @@ revoke r1 from u1; ERROR HY000: Cannot revoke role 'r1' from: 'u1'@'%' show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` select * from mysql.roles_mapping; Host User Role Admin_option localhost root r1 Y @@ -30,8 +30,8 @@ grant r1 to u1; grant r1 to u1; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT r1 TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT `r1` TO `u1`@`%` select * from mysql.roles_mapping; Host User Role Admin_option % u1 r1 N @@ -39,7 +39,7 @@ localhost root r1 Y drop role r1; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` select * from mysql.roles_mapping; Host User Role Admin_option create role r1; diff --git a/mysql-test/suite/roles/recursive.result b/mysql-test/suite/roles/recursive.result index 897577ba2ff..0d45a0e03d0 100644 --- a/mysql-test/suite/roles/recursive.result +++ b/mysql-test/suite/roles/recursive.result @@ -26,8 +26,8 @@ ERROR HY000: Cannot grant role 'role10' to: 'role2' connect foo, localhost, foo; show grants; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT role10 TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT `role10` TO `foo`@`localhost` select * from information_schema.applicable_roles; GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT foo@localhost role10 NO NO @@ -56,27 +56,27 @@ count(*) 22 show grants; Grants for foo@localhost -GRANT SELECT ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT ON *.* TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` select * from information_schema.enabled_roles; ROLE_NAME role1 @@ -114,28 +114,28 @@ count(*) 22 show grants; Grants for foo@localhost -GRANT SELECT ON `mysql`.* TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT ON `mysql`.* TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; revoke select on mysql.* from role1; show status like 'debug%'; @@ -157,28 +157,28 @@ count(*) 22 show grants; Grants for foo@localhost -GRANT SELECT ON `mysql`.`roles_mapping` TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT ON `mysql`.`roles_mapping` TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; revoke select on mysql.roles_mapping from role1; show status like 'debug%'; @@ -202,28 +202,28 @@ count(concat(User)) 22 show grants; Grants for foo@localhost -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; grant select(Host) on mysql.roles_mapping to role3; show status like 'debug%'; @@ -236,29 +236,29 @@ count(concat(User,Host)) 22 show grants; Grants for foo@localhost -GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO 'role3' -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO `role3` +GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; revoke select(User) on mysql.roles_mapping from role1; show status like 'debug%'; diff --git a/mysql-test/suite/roles/recursive_dbug.result b/mysql-test/suite/roles/recursive_dbug.result index cec461be4a2..417602c5c60 100644 --- a/mysql-test/suite/roles/recursive_dbug.result +++ b/mysql-test/suite/roles/recursive_dbug.result @@ -30,8 +30,8 @@ ERROR HY000: Cannot grant role 'role10' to: 'role2' connect foo, localhost, foo; show grants; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT role10 TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT `role10` TO `foo`@`localhost` select * from information_schema.applicable_roles; GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT foo@localhost role10 NO NO @@ -70,27 +70,27 @@ count(*) 22 show grants; Grants for foo@localhost -GRANT SELECT ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT ON *.* TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` select * from information_schema.enabled_roles; ROLE_NAME role1 @@ -138,28 +138,28 @@ count(*) 22 show grants; Grants for foo@localhost -GRANT SELECT ON `mysql`.* TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT ON `mysql`.* TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; revoke select on mysql.* from role1; show status like 'debug%'; @@ -191,28 +191,28 @@ count(*) 22 show grants; Grants for foo@localhost -GRANT SELECT ON `mysql`.`roles_mapping` TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT ON `mysql`.`roles_mapping` TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; revoke select on mysql.roles_mapping from role1; show status like 'debug%'; @@ -246,28 +246,28 @@ count(concat(User)) 22 show grants; Grants for foo@localhost -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; grant select(Host) on mysql.roles_mapping to role3; show status like 'debug%'; @@ -285,29 +285,29 @@ count(concat(User,Host)) 22 show grants; Grants for foo@localhost -GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO 'role3' -GRANT SELECT (User) ON `mysql`.`roles_mapping` TO 'role1' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role10' -GRANT USAGE ON *.* TO 'role2' -GRANT USAGE ON *.* TO 'role3' -GRANT USAGE ON *.* TO 'role4' -GRANT USAGE ON *.* TO 'role5' -GRANT USAGE ON *.* TO 'role6' -GRANT USAGE ON *.* TO 'role7' -GRANT USAGE ON *.* TO 'role9' -GRANT role1 TO 'role2' -GRANT role10 TO 'foo'@'localhost' -GRANT role2 TO 'role4' -GRANT role2 TO 'role5' -GRANT role3 TO 'role5' -GRANT role4 TO 'role6' -GRANT role5 TO 'role6' -GRANT role5 TO 'role7' -GRANT role6 TO 'role9' -GRANT role7 TO 'role9' -GRANT role9 TO 'role10' +GRANT SELECT (Host) ON `mysql`.`roles_mapping` TO `role3` +GRANT SELECT (User) ON `mysql`.`roles_mapping` TO `role1` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role10` +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT USAGE ON *.* TO `role3` +GRANT USAGE ON *.* TO `role4` +GRANT USAGE ON *.* TO `role5` +GRANT USAGE ON *.* TO `role6` +GRANT USAGE ON *.* TO `role7` +GRANT USAGE ON *.* TO `role9` +GRANT `role10` TO `foo`@`localhost` +GRANT `role1` TO `role2` +GRANT `role2` TO `role4` +GRANT `role2` TO `role5` +GRANT `role3` TO `role5` +GRANT `role4` TO `role6` +GRANT `role5` TO `role6` +GRANT `role5` TO `role7` +GRANT `role6` TO `role9` +GRANT `role7` TO `role9` +GRANT `role9` TO `role10` connection default; revoke select(User) on mysql.roles_mapping from role1; show status like 'debug%'; diff --git a/mysql-test/suite/roles/revoke_all.result b/mysql-test/suite/roles/revoke_all.result index 7e72b5bc766..864cc57a830 100644 --- a/mysql-test/suite/roles/revoke_all.result +++ b/mysql-test/suite/roles/revoke_all.result @@ -10,18 +10,18 @@ grant r1 to u1; grant r4 to r1; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' -GRANT r1 TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` +GRANT `r1` TO `u1`@`%` show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r2 TO 'r1' -GRANT r3 TO 'r2' -GRANT r4 TO 'r1' -GRANT r4 TO 'r3' +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r2` TO `r1` +GRANT `r3` TO `r2` +GRANT `r4` TO `r1` +GRANT `r4` TO `r3` grant SELECT on *.* to u1; grant INSERT on mysql.* to r1; grant DELETE on mysql.roles_mapping to r2; @@ -38,146 +38,146 @@ grant execute on procedure mysql.test_proc to r3; grant execute on mysql.* to r4; show grants for r1; Grants for r1 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT EXECUTE ON `mysql`.* TO 'r4' -GRANT INSERT ON `mysql`.* TO 'r1' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r2 TO 'r1' -GRANT r3 TO 'r2' -GRANT r4 TO 'r1' -GRANT r4 TO 'r3' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT EXECUTE ON `mysql`.* TO `r4` +GRANT INSERT ON `mysql`.* TO `r1` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r2` TO `r1` +GRANT `r3` TO `r2` +GRANT `r4` TO `r1` +GRANT `r4` TO `r3` show grants for r2; Grants for r2 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT EXECUTE ON `mysql`.* TO 'r4' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r3 TO 'r2' -GRANT r4 TO 'r3' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT EXECUTE ON `mysql`.* TO `r4` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r3` TO `r2` +GRANT `r4` TO `r3` show grants for r3; Grants for r3 -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT EXECUTE ON `mysql`.* TO 'r4' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r4 TO 'r3' +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT EXECUTE ON `mysql`.* TO `r4` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r4` TO `r3` show grants for r4; Grants for r4 -GRANT EXECUTE ON `mysql`.* TO 'r4' -GRANT USAGE ON *.* TO 'r4' +GRANT EXECUTE ON `mysql`.* TO `r4` +GRANT USAGE ON *.* TO `r4` revoke all privileges, grant option from r4; show grants for r1; Grants for r1 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT INSERT ON `mysql`.* TO 'r1' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r2 TO 'r1' -GRANT r3 TO 'r2' -GRANT r4 TO 'r1' -GRANT r4 TO 'r3' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT INSERT ON `mysql`.* TO `r1` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r2` TO `r1` +GRANT `r3` TO `r2` +GRANT `r4` TO `r1` +GRANT `r4` TO `r3` show grants for r2; Grants for r2 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r3 TO 'r2' -GRANT r4 TO 'r3' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r3` TO `r2` +GRANT `r4` TO `r3` show grants for r3; Grants for r3 -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'r3' -GRANT UPDATE ON `mysql`.`user` TO 'r3' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r4 TO 'r3' +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `r3` +GRANT UPDATE ON `mysql`.`user` TO `r3` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r4` TO `r3` show grants for r4; Grants for r4 -GRANT USAGE ON *.* TO 'r4' +GRANT USAGE ON *.* TO `r4` revoke all privileges, grant option from r3; show grants for r1; Grants for r1 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT INSERT ON `mysql`.* TO 'r1' -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT USAGE ON *.* TO 'r4' -GRANT r2 TO 'r1' -GRANT r3 TO 'r2' -GRANT r4 TO 'r1' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT INSERT ON `mysql`.* TO `r1` +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT USAGE ON *.* TO `r4` +GRANT `r2` TO `r1` +GRANT `r3` TO `r2` +GRANT `r4` TO `r1` show grants for r2; Grants for r2 -GRANT DELETE ON `mysql`.`roles_mapping` TO 'r2' -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'r2' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r3' -GRANT r3 TO 'r2' +GRANT DELETE ON `mysql`.`roles_mapping` TO `r2` +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `r2` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r3` +GRANT `r3` TO `r2` show grants for r3; Grants for r3 -GRANT USAGE ON *.* TO 'r3' +GRANT USAGE ON *.* TO `r3` show grants for r4; Grants for r4 -GRANT USAGE ON *.* TO 'r4' +GRANT USAGE ON *.* TO `r4` revoke all privileges, grant option from r2; show grants for r1; Grants for r1 -GRANT INSERT ON `mysql`.* TO 'r1' -GRANT USAGE ON *.* TO 'r1' -GRANT USAGE ON *.* TO 'r2' -GRANT USAGE ON *.* TO 'r4' -GRANT r2 TO 'r1' -GRANT r4 TO 'r1' +GRANT INSERT ON `mysql`.* TO `r1` +GRANT USAGE ON *.* TO `r1` +GRANT USAGE ON *.* TO `r2` +GRANT USAGE ON *.* TO `r4` +GRANT `r2` TO `r1` +GRANT `r4` TO `r1` show grants for r2; Grants for r2 -GRANT USAGE ON *.* TO 'r2' +GRANT USAGE ON *.* TO `r2` show grants for r3; Grants for r3 -GRANT USAGE ON *.* TO 'r3' +GRANT USAGE ON *.* TO `r3` show grants for r4; Grants for r4 -GRANT USAGE ON *.* TO 'r4' +GRANT USAGE ON *.* TO `r4` revoke all privileges, grant option from r1; show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` show grants for r2; Grants for r2 -GRANT USAGE ON *.* TO 'r2' +GRANT USAGE ON *.* TO `r2` show grants for r3; Grants for r3 -GRANT USAGE ON *.* TO 'r3' +GRANT USAGE ON *.* TO `r3` show grants for r4; Grants for r4 -GRANT USAGE ON *.* TO 'r4' +GRANT USAGE ON *.* TO `r4` revoke all privileges, grant option from u1; show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` drop function mysql.test_func; drop procedure mysql.test_proc; show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` drop role r1, r2, r3, r4; drop user u1; diff --git a/mysql-test/suite/roles/role_case_sensitive-10744.result b/mysql-test/suite/roles/role_case_sensitive-10744.result index b898310e83c..05ac5c95e31 100644 --- a/mysql-test/suite/roles/role_case_sensitive-10744.result +++ b/mysql-test/suite/roles/role_case_sensitive-10744.result @@ -21,8 +21,8 @@ grant select on secret_db.* to test_role; grant test_role to test_user; show grants for test_user; Grants for test_user@% -GRANT test_role TO 'test_user'@'%' -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT `test_role` TO `test_user`@`%` +GRANT USAGE ON *.* TO `test_user`@`%` # # Now test the UPPER case role. # @@ -30,9 +30,9 @@ grant test_ROLE to test_user; grant insert on secret_db.t1 to test_ROLE; show grants for test_user; Grants for test_user@% -GRANT test_role TO 'test_user'@'%' -GRANT test_ROLE TO 'test_user'@'%' -GRANT USAGE ON *.* TO 'test_user'@'%' +GRANT `test_role` TO `test_user`@`%` +GRANT `test_ROLE` TO `test_user`@`%` +GRANT USAGE ON *.* TO `test_user`@`%` connect test_user,localhost,test_user; # # Test users privileges when interacting with those roles; diff --git a/mysql-test/suite/roles/rpl_definer.result b/mysql-test/suite/roles/rpl_definer.result index 2d10dc6cd7a..185b17fd51b 100644 --- a/mysql-test/suite/roles/rpl_definer.result +++ b/mysql-test/suite/roles/rpl_definer.result @@ -7,14 +7,14 @@ grant role2 to role1; set role role1; show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT EXECUTE ON `test`.* TO 'role2' +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION +GRANT EXECUTE ON `test`.* TO `role2` GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role2' -GRANT role1 TO 'root'@'localhost' WITH ADMIN OPTION -GRANT role2 TO 'role1' -GRANT role2 TO 'root'@'localhost' WITH ADMIN OPTION +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT `role1` TO `root`@`localhost` WITH ADMIN OPTION +GRANT `role2` TO `role1` +GRANT `role2` TO `root`@`localhost` WITH ADMIN OPTION create definer=current_user procedure pcu() select current_user; create definer=root@localhost procedure pu() select "root@localhost"; create definer=current_role procedure pcr() select current_role; @@ -39,14 +39,14 @@ connection slave; set role role1; show grants; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT EXECUTE ON `test`.* TO 'role2' +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION +GRANT EXECUTE ON `test`.* TO `role2` GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION -GRANT USAGE ON *.* TO 'role1' -GRANT USAGE ON *.* TO 'role2' -GRANT role1 TO 'root'@'localhost' WITH ADMIN OPTION -GRANT role2 TO 'role1' -GRANT role2 TO 'root'@'localhost' WITH ADMIN OPTION +GRANT USAGE ON *.* TO `role1` +GRANT USAGE ON *.* TO `role2` +GRANT `role1` TO `root`@`localhost` WITH ADMIN OPTION +GRANT `role2` TO `role1` +GRANT `role2` TO `root`@`localhost` WITH ADMIN OPTION show create procedure pcu; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation pcu STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pcu`() diff --git a/mysql-test/suite/roles/set_and_drop.result b/mysql-test/suite/roles/set_and_drop.result index 2d3e675ebd0..87ccad2b447 100644 --- a/mysql-test/suite/roles/set_and_drop.result +++ b/mysql-test/suite/roles/set_and_drop.result @@ -56,9 +56,9 @@ drop role role2; connection foo; show grants; Grants for foo@localhost -GRANT role1 TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'foo'@'localhost' -GRANT USAGE ON *.* TO 'role1' +GRANT `role1` TO `foo`@`localhost` +GRANT USAGE ON *.* TO `foo`@`localhost` +GRANT USAGE ON *.* TO `role1` select * from information_schema.enabled_roles; ROLE_NAME role1 @@ -112,7 +112,7 @@ select a from mysqltest1.t2; ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't2' show grants; Grants for foo@localhost -GRANT USAGE ON *.* TO 'foo'@'localhost' +GRANT USAGE ON *.* TO `foo`@`localhost` select * from information_schema.enabled_roles; ROLE_NAME NULL diff --git a/mysql-test/suite/roles/set_default_role_clear.result b/mysql-test/suite/roles/set_default_role_clear.result index 7f54b5eabcc..56e9662154c 100644 --- a/mysql-test/suite/roles/set_default_role_clear.result +++ b/mysql-test/suite/roles/set_default_role_clear.result @@ -4,8 +4,8 @@ grant select on *.* to test_role; grant test_role to test_user@localhost; show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` set default role test_role; select user, host, default_role from mysql.user; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user' @@ -14,9 +14,9 @@ user host default_role test_user localhost test_role show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT SELECT ON *.* TO 'test_role' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT SELECT ON *.* TO `test_role` select user, host, default_role from mysql.user where user='test_user'; user host default_role test_user localhost test_role diff --git a/mysql-test/suite/roles/set_default_role_for.result b/mysql-test/suite/roles/set_default_role_for.result index 9880671ba09..f88dc83dfd9 100644 --- a/mysql-test/suite/roles/set_default_role_for.result +++ b/mysql-test/suite/roles/set_default_role_for.result @@ -18,9 +18,9 @@ ERROR OP000: Invalid role specification `role_b` set default role role_b for user_b@localhost; show grants; Grants for user_a@localhost -GRANT role_a TO 'user_a'@'localhost' -GRANT USAGE ON *.* TO 'user_a'@'localhost' -GRANT SELECT ON *.* TO 'role_a' +GRANT `role_a` TO `user_a`@`localhost` +GRANT USAGE ON *.* TO `user_a`@`localhost` +GRANT SELECT ON *.* TO `role_a` select user, host, default_role from mysql.user where user like 'user_%'; user host default_role user_a localhost role_a @@ -39,9 +39,9 @@ set default role role_b for current_user; ERROR OP000: Invalid role specification `role_b` show grants; Grants for user_b@localhost -GRANT role_b TO 'user_b'@'localhost' -GRANT USAGE ON *.* TO 'user_b'@'localhost' -GRANT INSERT, UPDATE ON *.* TO 'role_b' +GRANT `role_b` TO `user_b`@`localhost` +GRANT USAGE ON *.* TO `user_b`@`localhost` +GRANT INSERT, UPDATE ON *.* TO `role_b` select user, host, default_role from mysql.user where user like 'user_%'; ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table 'user' insert ignore into mysql.user (user, host) values ('someuser', 'somehost'); @@ -53,9 +53,9 @@ Warning 1364 Field 'authentication_string' doesn't have a default value set default role NONE for user_a@localhost; show grants; Grants for user_a@localhost -GRANT role_a TO 'user_a'@'localhost' -GRANT USAGE ON *.* TO 'user_a'@'localhost' -GRANT INSERT, UPDATE ON *.* TO 'role_b' +GRANT `role_a` TO `user_a`@`localhost` +GRANT USAGE ON *.* TO `user_a`@`localhost` +GRANT INSERT, UPDATE ON *.* TO `role_b` select user, host, default_role from mysql.user where user like 'user_%'; ERROR 42000: SELECT command denied to user 'user_a'@'localhost' for table 'user' drop role role_a; diff --git a/mysql-test/suite/roles/set_default_role_invalid.result b/mysql-test/suite/roles/set_default_role_invalid.result index 5bcaa9acb86..4a3b88f0ef8 100644 --- a/mysql-test/suite/roles/set_default_role_invalid.result +++ b/mysql-test/suite/roles/set_default_role_invalid.result @@ -5,8 +5,8 @@ grant select on *.* to test_role; grant test_role to test_user@localhost; show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` select user, host, default_role from mysql.user; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user' set default role invalid_role; @@ -21,9 +21,9 @@ user host default_role test_user localhost test_role show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT SELECT ON *.* TO 'test_role' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT SELECT ON *.* TO `test_role` select user, host, default_role from mysql.user where user='test_user'; user host default_role test_user localhost test_role diff --git a/mysql-test/suite/roles/set_default_role_new_connection.result b/mysql-test/suite/roles/set_default_role_new_connection.result index a59ecbd75f7..03575e8aa8a 100644 --- a/mysql-test/suite/roles/set_default_role_new_connection.result +++ b/mysql-test/suite/roles/set_default_role_new_connection.result @@ -5,8 +5,8 @@ grant test_role to test_user@localhost; connect c1, localhost, test_user,,; show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` select user, host, default_role from mysql.user where user = 'test_user'; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user' set default role test_role; @@ -20,9 +20,9 @@ test_user localhost test_role connect c1, localhost, test_user,,; show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT SELECT ON *.* TO 'test_role' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT SELECT ON *.* TO `test_role` select user, host, default_role from mysql.user where user = 'test_user'; user host default_role test_user localhost test_role @@ -35,8 +35,8 @@ test_user localhost connect c1, localhost, test_user,,; show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` select user, host, default_role from mysql.user where user = 'test_user'; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'user' disconnect c1; @@ -48,9 +48,9 @@ set default role test_role for test_user@localhost; connect c1, localhost, test_user,,; show grants; Grants for test_user@localhost -GRANT test_role TO 'test_user'@'localhost' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT SELECT ON *.* TO 'test_role' +GRANT `test_role` TO `test_user`@`localhost` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT SELECT ON *.* TO `test_role` select user, host, default_role from mysql.user where user = 'test_user'; user host default_role test_user localhost test_role diff --git a/mysql-test/suite/roles/set_role-13655.result b/mysql-test/suite/roles/set_role-13655.result index c30e4115953..9da16c1dd51 100644 --- a/mysql-test/suite/roles/set_role-13655.result +++ b/mysql-test/suite/roles/set_role-13655.result @@ -18,10 +18,10 @@ create role admin; grant simple to admin; show grants for admin; Grants for admin -GRANT simple TO 'admin' -GRANT USAGE ON *.* TO 'admin' -GRANT USAGE ON *.* TO 'simple' -GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES, EXECUTE ON `t`.* TO 'simple' +GRANT `simple` TO `admin` +GRANT USAGE ON *.* TO `admin` +GRANT USAGE ON *.* TO `simple` +GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES, EXECUTE ON `t`.* TO `simple` # # Finally, we give the admin all the available privileges for the db. # @@ -37,13 +37,13 @@ ERROR 42000: Access denied for user 'foo'@'%' to database 't' set role admin; show grants; Grants for foo@% -GRANT admin TO 'foo'@'%' -GRANT USAGE ON *.* TO 'foo'@'%' -GRANT simple TO 'admin' -GRANT USAGE ON *.* TO 'admin' -GRANT ALL PRIVILEGES ON `t`.* TO 'admin' -GRANT USAGE ON *.* TO 'simple' -GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES, EXECUTE ON `t`.* TO 'simple' +GRANT `admin` TO `foo`@`%` +GRANT USAGE ON *.* TO `foo`@`%` +GRANT `simple` TO `admin` +GRANT USAGE ON *.* TO `admin` +GRANT ALL PRIVILEGES ON `t`.* TO `admin` +GRANT USAGE ON *.* TO `simple` +GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES, EXECUTE ON `t`.* TO `simple` create database t; drop database t; connection default; diff --git a/mysql-test/suite/roles/set_role-9614.result b/mysql-test/suite/roles/set_role-9614.result index 37f6db070c0..7085d2287e2 100644 --- a/mysql-test/suite/roles/set_role-9614.result +++ b/mysql-test/suite/roles/set_role-9614.result @@ -35,16 +35,16 @@ GRANT `client` TO `usertestjohn`@`%`; # SHOW GRANTS FOR `john`@`%`; Grants for john@% -GRANT client TO 'john'@'%' -GRANT USAGE ON *.* TO 'john'@'%' +GRANT `client` TO `john`@`%` +GRANT USAGE ON *.* TO `john`@`%` SHOW GRANTS FOR `usertestjohn`@`%`; Grants for usertestjohn@% -GRANT client TO 'usertestjohn'@'%' -GRANT USAGE ON *.* TO 'usertestjohn'@'%' +GRANT `client` TO `usertestjohn`@`%` +GRANT USAGE ON *.* TO `usertestjohn`@`%` SHOW GRANTS FOR `client`; Grants for client -GRANT USAGE ON *.* TO 'client' -GRANT SELECT ON `bug_db`.`t0` TO 'client' +GRANT USAGE ON *.* TO `client` +GRANT SELECT ON `bug_db`.`t0` TO `client` show databases; Database bug_db @@ -84,10 +84,10 @@ information_schema test show grants; Grants for usertestjohn@% -GRANT client TO 'usertestjohn'@'%' -GRANT USAGE ON *.* TO 'usertestjohn'@'%' -GRANT USAGE ON *.* TO 'client' -GRANT SELECT ON `bug_db`.`t0` TO 'client' +GRANT `client` TO `usertestjohn`@`%` +GRANT USAGE ON *.* TO `usertestjohn`@`%` +GRANT USAGE ON *.* TO `client` +GRANT SELECT ON `bug_db`.`t0` TO `client` use bug_db; # # Cleanup diff --git a/mysql-test/suite/roles/set_role-database-recursive.result b/mysql-test/suite/roles/set_role-database-recursive.result index 479e553c3d1..c919a800220 100644 --- a/mysql-test/suite/roles/set_role-database-recursive.result +++ b/mysql-test/suite/roles/set_role-database-recursive.result @@ -67,17 +67,17 @@ set role test_role1; delete from mysql.user where user='no such user'; show grants; Grants for test_user@localhost -GRANT DELETE ON `mysql`.* TO 'test_role4' -GRANT SELECT ON `mysql`.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role3' -GRANT USAGE ON *.* TO 'test_role4' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' -GRANT test_role2 TO 'test_user'@'localhost' -GRANT test_role3 TO 'test_role2' -GRANT test_role4 TO 'test_role3' +GRANT DELETE ON `mysql`.* TO `test_role4` +GRANT SELECT ON `mysql`.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role3` +GRANT USAGE ON *.* TO `test_role4` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` +GRANT `test_role2` TO `test_user`@`localhost` +GRANT `test_role3` TO `test_role2` +GRANT `test_role4` TO `test_role3` drop user test_user@localhost; drop role test_role1, test_role2, test_role3, test_role4; diff --git a/mysql-test/suite/roles/set_role-multiple-role.result b/mysql-test/suite/roles/set_role-multiple-role.result index fca53b4d645..2ddd1e8a510 100644 --- a/mysql-test/suite/roles/set_role-multiple-role.result +++ b/mysql-test/suite/roles/set_role-multiple-role.result @@ -25,14 +25,14 @@ select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT r_crt TO 'test_user'@'localhost' -GRANT r_del TO 'test_user'@'localhost' -GRANT r_drp TO 'test_user'@'localhost' -GRANT r_ins TO 'test_user'@'localhost' -GRANT r_rld TO 'test_user'@'localhost' -GRANT r_sel TO 'test_user'@'localhost' -GRANT r_upd TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `r_crt` TO `test_user`@`localhost` +GRANT `r_del` TO `test_user`@`localhost` +GRANT `r_drp` TO `test_user`@`localhost` +GRANT `r_ins` TO `test_user`@`localhost` +GRANT `r_rld` TO `test_user`@`localhost` +GRANT `r_sel` TO `test_user`@`localhost` +GRANT `r_upd` TO `test_user`@`localhost` select current_user(), current_role(); current_user() current_role() test_user@localhost NULL @@ -42,15 +42,15 @@ current_user() current_role() test_user@localhost r_sel show grants; Grants for test_user@localhost -GRANT SELECT ON *.* TO 'r_sel' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT r_crt TO 'test_user'@'localhost' -GRANT r_del TO 'test_user'@'localhost' -GRANT r_drp TO 'test_user'@'localhost' -GRANT r_ins TO 'test_user'@'localhost' -GRANT r_rld TO 'test_user'@'localhost' -GRANT r_sel TO 'test_user'@'localhost' -GRANT r_upd TO 'test_user'@'localhost' +GRANT SELECT ON *.* TO `r_sel` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `r_crt` TO `test_user`@`localhost` +GRANT `r_del` TO `test_user`@`localhost` +GRANT `r_drp` TO `test_user`@`localhost` +GRANT `r_ins` TO `test_user`@`localhost` +GRANT `r_rld` TO `test_user`@`localhost` +GRANT `r_sel` TO `test_user`@`localhost` +GRANT `r_upd` TO `test_user`@`localhost` select * from mysql.roles_mapping; Host User Role Admin_option localhost root r_crt Y @@ -73,15 +73,15 @@ current_user() current_role() test_user@localhost r_ins show grants; Grants for test_user@localhost -GRANT INSERT ON *.* TO 'r_ins' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT r_crt TO 'test_user'@'localhost' -GRANT r_del TO 'test_user'@'localhost' -GRANT r_drp TO 'test_user'@'localhost' -GRANT r_ins TO 'test_user'@'localhost' -GRANT r_rld TO 'test_user'@'localhost' -GRANT r_sel TO 'test_user'@'localhost' -GRANT r_upd TO 'test_user'@'localhost' +GRANT INSERT ON *.* TO `r_ins` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `r_crt` TO `test_user`@`localhost` +GRANT `r_del` TO `test_user`@`localhost` +GRANT `r_drp` TO `test_user`@`localhost` +GRANT `r_ins` TO `test_user`@`localhost` +GRANT `r_rld` TO `test_user`@`localhost` +GRANT `r_sel` TO `test_user`@`localhost` +GRANT `r_upd` TO `test_user`@`localhost` select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' insert into mysql.roles_mapping values ('', 'r_sel', 'r_rld', 'N'); diff --git a/mysql-test/suite/roles/set_role-recursive.result b/mysql-test/suite/roles/set_role-recursive.result index 2b34c3eeebe..945cadfb2b2 100644 --- a/mysql-test/suite/roles/set_role-recursive.result +++ b/mysql-test/suite/roles/set_role-recursive.result @@ -25,8 +25,8 @@ select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select current_user(), current_role(); current_user() current_role() test_user@localhost NULL @@ -36,35 +36,35 @@ current_user() current_role() test_user@localhost test_role1 show grants; Grants for test_user@localhost -GRANT SELECT ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` select * from mysql.roles_mapping where Host=''; Host User Role Admin_option test_role1 test_role2 N show grants; Grants for test_user@localhost -GRANT SELECT ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` set role none; select current_user(), current_role(); current_user() current_role() test_user@localhost NULL show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` set role test_role2; ERROR OP000: Invalid role specification `test_role2` select current_user(), current_role(); @@ -72,43 +72,43 @@ current_user() current_role() test_user@localhost NULL show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` set role test_role1; select current_user(), current_role(); current_user() current_role() test_user@localhost test_role1 show grants; Grants for test_user@localhost -GRANT SELECT ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` select * from mysql.roles_mapping where Host=''; Host User Role Admin_option test_role1 test_role2 N show grants; Grants for test_user@localhost -GRANT SELECT ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` set role none; select current_user(), current_role(); current_user() current_role() test_user@localhost NULL show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' delete from mysql.user where user='test_role1'; diff --git a/mysql-test/suite/roles/set_role-routine-simple.result b/mysql-test/suite/roles/set_role-routine-simple.result index 3e17a78ad77..2df370b273d 100644 --- a/mysql-test/suite/roles/set_role-routine-simple.result +++ b/mysql-test/suite/roles/set_role-routine-simple.result @@ -31,9 +31,9 @@ grant execute on procedure mysql.test_proc to test_role2; grant execute on mysql.* to test_role3; show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role3 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role3` TO `test_user`@`localhost` use mysql; ERROR 42000: Access denied for user 'test_user'@'localhost' to database 'mysql' select current_user(), current_role(); @@ -53,23 +53,23 @@ test_func('AABBCCDD') Test string: AABBCCDD show grants; Grants for test_user@localhost -GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO 'test_role2' -GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' -GRANT test_role3 TO 'test_user'@'localhost' +GRANT EXECUTE ON FUNCTION `mysql`.`test_func` TO `test_role2` +GRANT EXECUTE ON PROCEDURE `mysql`.`test_proc` TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` +GRANT `test_role3` TO `test_user`@`localhost` set role none; select current_user(), current_role(); current_user() current_role() test_user@localhost NULL show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role3 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role3` TO `test_user`@`localhost` call test_proc(@a); ERROR 42000: execute command denied to user 'test_user'@'localhost' for routine 'mysql.test_proc' SELECT test_func('AABBCCDD'); @@ -80,11 +80,11 @@ current_user() current_role() test_user@localhost test_role3 show grants; Grants for test_user@localhost -GRANT EXECUTE ON `mysql`.* TO 'test_role3' -GRANT USAGE ON *.* TO 'test_role3' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role3 TO 'test_user'@'localhost' +GRANT EXECUTE ON `mysql`.* TO `test_role3` +GRANT USAGE ON *.* TO `test_role3` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role3` TO `test_user`@`localhost` call test_proc(@a); SELECT @a; @a diff --git a/mysql-test/suite/roles/set_role-simple.result b/mysql-test/suite/roles/set_role-simple.result index 9af698c7b09..af237113bb3 100644 --- a/mysql-test/suite/roles/set_role-simple.result +++ b/mysql-test/suite/roles/set_role-simple.result @@ -17,8 +17,8 @@ select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select current_user(), current_role(); current_user() current_role() test_user@localhost NULL @@ -28,9 +28,9 @@ current_user() current_role() test_user@localhost test_role1 show grants; Grants for test_user@localhost -GRANT SELECT ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT SELECT ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select * from mysql.roles_mapping; Host User Role Admin_option localhost root test_role1 Y @@ -52,7 +52,7 @@ current_user user1@% show grants; Grants for user1@% -GRANT USAGE ON *.* TO 'user1'@'%' +GRANT USAGE ON *.* TO `user1`@`%` set role none; connection default; drop user user1; diff --git a/mysql-test/suite/roles/set_role-table-column-priv.result b/mysql-test/suite/roles/set_role-table-column-priv.result index 721bd3039a3..738b3313bb2 100644 --- a/mysql-test/suite/roles/set_role-table-column-priv.result +++ b/mysql-test/suite/roles/set_role-table-column-priv.result @@ -19,8 +19,8 @@ select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select current_user(), current_role(); current_user() current_role() test_user@localhost NULL @@ -30,12 +30,12 @@ current_user() current_role() test_user@localhost test_role1 show grants; Grants for test_user@localhost -GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for column 'Host' in table 'roles_mapping' select Role from mysql.roles_mapping; @@ -46,12 +46,12 @@ test_role2 test_role2 show grants; Grants for test_user@localhost -GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT (Role) ON `mysql`.`roles_mapping` TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` use mysql; set role none; select current_user(), current_role(); diff --git a/mysql-test/suite/roles/set_role-table-simple.result b/mysql-test/suite/roles/set_role-table-simple.result index f5688dbe62e..dcd0914db8d 100644 --- a/mysql-test/suite/roles/set_role-table-simple.result +++ b/mysql-test/suite/roles/set_role-table-simple.result @@ -19,8 +19,8 @@ select * from mysql.roles_mapping; ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping' show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` select current_user(), current_role(); current_user() current_role() test_user@localhost NULL @@ -30,12 +30,12 @@ current_user() current_role() test_user@localhost test_role1 show grants; Grants for test_user@localhost -GRANT SELECT ON `mysql`.`roles_mapping` TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT ON `mysql`.`roles_mapping` TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` select * from mysql.roles_mapping; Host User Role Admin_option test_role1 test_role2 N @@ -44,12 +44,12 @@ localhost root test_role2 Y localhost test_user test_role1 N show grants; Grants for test_user@localhost -GRANT SELECT ON `mysql`.`roles_mapping` TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' +GRANT SELECT ON `mysql`.`roles_mapping` TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` use mysql; set role none; select current_user(), current_role(); diff --git a/mysql-test/suite/roles/show_grants.result b/mysql-test/suite/roles/show_grants.result index 5d46b038cf8..634fab34131 100644 --- a/mysql-test/suite/roles/show_grants.result +++ b/mysql-test/suite/roles/show_grants.result @@ -34,9 +34,9 @@ test_user@localhost test_role1 NO NO test_user@localhost test_role2 NO NO show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` select current_user(), current_role(); current_user() current_role() test_user@localhost NULL @@ -50,13 +50,13 @@ current_user() current_role() test_user@localhost test_role1 show grants; Grants for test_user@localhost -GRANT SELECT ON `mysql`.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_role1' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT SELECT ON `mysql`.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_role1` +GRANT `test_role2` TO `test_user`@`localhost` set role none; select * from information_schema.enabled_roles; ROLE_NAME @@ -66,28 +66,28 @@ current_user() current_role() test_user@localhost NULL show grants; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for test_user@localhost; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for test_role1; ERROR 42000: Access denied for user 'test_user'@'localhost' to database 'mysql' show grants for test_role2; ERROR 42000: Access denied for user 'test_user'@'localhost' to database 'mysql' show grants for CURRENT_USER; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for CURRENT_USER(); Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for CURRENT_ROLE; ERROR 42000: There is no such grant defined for user 'test_user' on host 'localhost' show grants for CURRENT_ROLE(); @@ -101,44 +101,44 @@ current_user() current_role() test_user@localhost test_role2 show grants; Grants for test_user@localhost -GRANT SELECT ON `mysql`.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT SELECT ON `mysql`.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role2` +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for test_user@localhost; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for test_role1; Grants for test_role1 -GRANT SELECT ON `mysql`.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role1' -GRANT USAGE ON *.* TO 'test_role2' -GRANT test_role2 TO 'test_role1' +GRANT SELECT ON `mysql`.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role1` +GRANT USAGE ON *.* TO `test_role2` +GRANT `test_role2` TO `test_role1` show grants for test_role2; Grants for test_role2 -GRANT SELECT ON `mysql`.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role2' +GRANT SELECT ON `mysql`.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role2` show grants for CURRENT_USER; Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for CURRENT_USER(); Grants for test_user@localhost -GRANT USAGE ON *.* TO 'test_user'@'localhost' -GRANT test_role1 TO 'test_user'@'localhost' -GRANT test_role2 TO 'test_user'@'localhost' +GRANT USAGE ON *.* TO `test_user`@`localhost` +GRANT `test_role1` TO `test_user`@`localhost` +GRANT `test_role2` TO `test_user`@`localhost` show grants for CURRENT_ROLE; Grants for test_role2 -GRANT SELECT ON `mysql`.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role2' +GRANT SELECT ON `mysql`.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role2` show grants for CURRENT_ROLE(); Grants for test_role2 -GRANT SELECT ON `mysql`.* TO 'test_role2' -GRANT USAGE ON *.* TO 'test_role2' +GRANT SELECT ON `mysql`.* TO `test_role2` +GRANT USAGE ON *.* TO `test_role2` drop user 'test_user'@'localhost'; revoke select on mysql.* from test_role2; drop role test_role1; diff --git a/mysql-test/suite/roles/show_grants_replicated.result b/mysql-test/suite/roles/show_grants_replicated.result index cb9df65dbbd..f635aa0827e 100644 --- a/mysql-test/suite/roles/show_grants_replicated.result +++ b/mysql-test/suite/roles/show_grants_replicated.result @@ -6,10 +6,10 @@ create role r1; # On master SHOW GRANTS work both for the user and the role: show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` # connection slave; # @@ -27,30 +27,30 @@ root@localhost r1 YES NO # Check show grants for the new user. show grants for u1; Grants for u1@% -GRANT USAGE ON *.* TO 'u1'@'%' +GRANT USAGE ON *.* TO `u1`@`%` # # Check show grants for the new role. show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` # # Check if flushing privileges preserves the state. flush privileges; show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` # # Check SHOW GRANTS after setting the role. set role r1; show grants; Grants for root@localhost -GRANT r1 TO 'root'@'localhost' WITH ADMIN OPTION -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT `r1` TO `root`@`localhost` WITH ADMIN OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` show grants for r1; Grants for r1 -GRANT USAGE ON *.* TO 'r1' +GRANT USAGE ON *.* TO `r1` connection master; drop role r1; drop user u1; diff --git a/mysql-test/suite/rpl/r/rpl_binlog_grant.result b/mysql-test/suite/rpl/r/rpl_binlog_grant.result index 0c780122e38..3f01c80b195 100644 --- a/mysql-test/suite/rpl/r/rpl_binlog_grant.result +++ b/mysql-test/suite/rpl/r/rpl_binlog_grant.result @@ -11,8 +11,8 @@ grant select on t to x@y; rollback; show grants for x@y; Grants for x@y -GRANT USAGE ON *.* TO 'x'@'y' -GRANT SELECT ON `d1`.`t` TO 'x'@'y' +GRANT USAGE ON *.* TO `x`@`y` +GRANT SELECT ON `d1`.`t` TO `x`@`y` start transaction; insert into t values (2); revoke select on t from x@y; @@ -23,7 +23,7 @@ s1 2 show grants for x@y; Grants for x@y -GRANT USAGE ON *.* TO 'x'@'y' +GRANT USAGE ON *.* TO `x`@`y` drop user x@y; drop database d1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result index 9eca21b38e4..0797e66e9ec 100644 --- a/mysql-test/suite/rpl/r/rpl_do_grant.result +++ b/mysql-test/suite/rpl/r/rpl_do_grant.result @@ -15,8 +15,8 @@ grant drop on test.* to rpl_do_grant@localhost; connection slave; show grants for rpl_do_grant@localhost; Grants for rpl_do_grant@localhost -GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost' -GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost' +GRANT SELECT ON *.* TO `rpl_do_grant`@`localhost` +GRANT DROP ON `test`.* TO `rpl_do_grant`@`localhost` connection master; set password for rpl_do_grant@localhost=password("does it work?"); connection slave; @@ -54,55 +54,55 @@ connection master; create user rpl_do_grant@localhost; show grants for rpl_do_grant@localhost; Grants for rpl_do_grant@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant`@`localhost` show grants for rpl_do_grant2@localhost; ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' connection slave; show grants for rpl_do_grant@localhost; Grants for rpl_do_grant@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant`@`localhost` show grants for rpl_do_grant2@localhost; ERROR 42000: There is no such grant defined for user 'rpl_do_grant2' on host 'localhost' connection master; rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection master; grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT, DELETE ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT, DELETE ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT, DELETE ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection master; revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' -GRANT INSERT ON `mysqltest1`.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` +GRANT INSERT ON `mysqltest1`.* TO `rpl_do_grant2`@`localhost` connection master; revoke all privileges, grant option from rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection slave; show grants for rpl_do_grant2@localhost; Grants for rpl_do_grant2@localhost -GRANT USAGE ON *.* TO 'rpl_do_grant2'@'localhost' +GRANT USAGE ON *.* TO `rpl_do_grant2`@`localhost` connection master; drop user rpl_do_grant2@localhost; show grants for rpl_do_grant2@localhost; @@ -142,9 +142,9 @@ Host Db User Routine_name Routine_type Grantor Proc_priv Timestamp localhost bug42217_db create_rout_db upgrade_del_func FUNCTION create_rout_db@localhost Execute,Alter Routine # SHOW GRANTS FOR 'create_rout_db'@'localhost'; Grants for create_rout_db@localhost -GRANT USAGE ON *.* TO 'create_rout_db'@'localhost' IDENTIFIED BY PASSWORD '*08792480350CBA057BDE781B9DF183B263934601' -GRANT CREATE ROUTINE ON `bug42217_db`.* TO 'create_rout_db'@'localhost' WITH GRANT OPTION -GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `bug42217_db`.`upgrade_del_func` TO 'create_rout_db'@'localhost' +GRANT USAGE ON *.* TO `create_rout_db`@`localhost` IDENTIFIED BY PASSWORD '*08792480350CBA057BDE781B9DF183B263934601' +GRANT CREATE ROUTINE ON `bug42217_db`.* TO `create_rout_db`@`localhost` WITH GRANT OPTION +GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `bug42217_db`.`upgrade_del_func` TO `create_rout_db`@`localhost` USE bug42217_db; SHOW CREATE FUNCTION upgrade_del_func; Function sql_mode Create Function character_set_client collation_connection Database Collation @@ -236,11 +236,11 @@ GRANT EXECUTE ON PROCEDURE p1 TO 'user49119'@'localhost'; ### Showing grants for both users: root and user49119 (master) SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' -GRANT EXECUTE ON PROCEDURE `test`.`p1` TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` +GRANT EXECUTE ON PROCEDURE `test`.`p1` TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection slave; @@ -248,11 +248,11 @@ connection slave; ### Showing grants for both users: root and user49119 (master) SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' -GRANT EXECUTE ON PROCEDURE `test`.`p1` TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` +GRANT EXECUTE ON PROCEDURE `test`.`p1` TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection master; @@ -266,10 +266,10 @@ ERROR 42000: There is no such grant defined for user 'root' on host 'localhost' ### after revoke statement failure SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection slave; @@ -278,10 +278,10 @@ connection slave; ### after revoke statement failure (should match SHOW GRANTS FOR 'user49119'@'localhost'; Grants for user49119@localhost -GRANT USAGE ON *.* TO 'user49119'@'localhost' +GRANT USAGE ON *.* TO `user49119`@`localhost` SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION +GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION ############################################################## connection master; diff --git a/mysql-test/suite/rpl/r/rpl_ignore_grant.result b/mysql-test/suite/rpl/r/rpl_ignore_grant.result index f3d69112efd..64da944a5dc 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_grant.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_grant.result @@ -17,8 +17,8 @@ grant select on *.* to rpl_ignore_grant@localhost; grant drop on test.* to rpl_ignore_grant@localhost; show grants for rpl_ignore_grant@localhost; Grants for rpl_ignore_grant@localhost -GRANT SELECT ON *.* TO 'rpl_ignore_grant'@'localhost' -GRANT DROP ON `test`.* TO 'rpl_ignore_grant'@'localhost' +GRANT SELECT ON *.* TO `rpl_ignore_grant`@`localhost` +GRANT DROP ON `test`.* TO `rpl_ignore_grant`@`localhost` connection slave; show grants for rpl_ignore_grant@localhost; ERROR 42000: There is no such grant defined for user 'rpl_ignore_grant' on host 'localhost' diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index 4eeb333d10c..1e0d6f537ab 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -44,54 +44,54 @@ GRANT INSERT ON test.* TO mysqltest6@localhost; GRANT INSERT ON test.t1 TO mysqltest6@localhost; show grants for mysqltest1@localhost; Grants for mysqltest1@localhost -GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' -GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest1`@`localhost` +GRANT SELECT ON `test`.`t1` TO `mysqltest1`@`localhost` show grants for mysqltest2@localhost; Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' -GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost' -GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +GRANT USAGE ON *.* TO `mysqltest2`@`localhost` +GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localhost` +GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost` show grants for mysqltest6@localhost; Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost' +GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` +GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost` +GRANT INSERT ON `test`.`t1` TO `mysqltest6`@`localhost` flush privileges; show grants for mysqltest5@somehost; Grants for mysqltest5@somehost -GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +GRANT USAGE ON *.* TO `mysqltest5`@`somehost` set sql_mode=""; connection slave; **** Checking grants on slave **** show grants for mysqltest2@localhost; Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' -GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +GRANT USAGE ON *.* TO `mysqltest2`@`localhost` +GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' -GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost` show grants for mysqltest5@somehost; Grants for mysqltest5@somehost -GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +GRANT USAGE ON *.* TO `mysqltest5`@`somehost` show grants for mysqltest6@localhost; Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' -GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` +GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost` show grants for mysqltest1@localhost; ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' **** Revoking grants on master **** @@ -102,27 +102,27 @@ REVOKE select(a) on t4 from mysqltest3@localhost; show grants for mysqltest1@localhost; Grants for mysqltest1@localhost -GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest1`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' connection slave; **** Checking grants on slave **** show grants for mysqltest1@localhost; ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' -GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' -GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' set global slave_exec_mode='IDEMPOTENT'; call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* error.* 1032"); connection master; diff --git a/mysql-test/suite/versioning/r/truncate_privilege.result b/mysql-test/suite/versioning/r/truncate_privilege.result index 3242c4557c5..e2b48c494be 100644 --- a/mysql-test/suite/versioning/r/truncate_privilege.result +++ b/mysql-test/suite/versioning/r/truncate_privilege.result @@ -9,7 +9,7 @@ create table mysqltest.t (a int) with system versioning; connection user1; show grants; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` delete history from mysqltest.t before system_time now(); ERROR 42000: DELETE HISTORY command denied to user 'mysqltest_1'@'localhost' for table 't' connection root; @@ -18,16 +18,16 @@ grant delete history on mysqltest.t to mysqltest_1@localhost; connection user1; show grants; Grants for mysqltest_1@localhost -GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' -GRANT DELETE HISTORY ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -GRANT DELETE HISTORY ON `mysqltest`.`t` TO 'mysqltest_1'@'localhost' +GRANT USAGE ON *.* TO `mysqltest_1`@`localhost` +GRANT DELETE HISTORY ON `mysqltest`.* TO `mysqltest_1`@`localhost` +GRANT DELETE HISTORY ON `mysqltest`.`t` TO `mysqltest_1`@`localhost` delete history from mysqltest.t before system_time now(); connection root; grant all on *.* to mysqltest_1@localhost; show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost -GRANT ALL PRIVILEGES ON *.* TO 'mysqltest_1'@'localhost' -GRANT DELETE HISTORY ON `mysqltest`.* TO 'mysqltest_1'@'localhost' -GRANT DELETE HISTORY ON `mysqltest`.`t` TO 'mysqltest_1'@'localhost' +GRANT ALL PRIVILEGES ON *.* TO `mysqltest_1`@`localhost` +GRANT DELETE HISTORY ON `mysqltest`.* TO `mysqltest_1`@`localhost` +GRANT DELETE HISTORY ON `mysqltest`.`t` TO `mysqltest_1`@`localhost` drop user mysqltest_1@localhost; drop database mysqltest; |