summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-02-11 14:40:35 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-02-11 14:40:35 +0100
commit646d1ec83a57d9a5b380079afc3612c1d9acadd5 (patch)
treeb46ec54915361f3baa221bcd01b4308a55c59c48
parentc1eaa385ffb44bdf6264d2cc4b4cc0e10284c88a (diff)
parent58b70dc13630d2f2f0244359d6351085d70fd5dd (diff)
downloadmariadb-git-646d1ec83a57d9a5b380079afc3612c1d9acadd5.tar.gz
Merge branch '10.3' into 10.4
-rw-r--r--.gitignore2
-rw-r--r--cmake/cpack_rpm.cmake2
-rw-r--r--cmake/install_layout.cmake2
-rw-r--r--man/CMakeLists.txt11
-rw-r--r--mysql-test/main/connect.result4
-rw-r--r--mysql-test/main/derived_cond_pushdown.result89
-rw-r--r--mysql-test/main/derived_cond_pushdown.test43
-rw-r--r--mysql-test/main/events_bugs.result8
-rw-r--r--mysql-test/main/events_grant.result6
-rw-r--r--mysql-test/main/fix_priv_tables.result16
-rw-r--r--mysql-test/main/grant.result562
-rw-r--r--mysql-test/main/grant2.result52
-rw-r--r--mysql-test/main/grant3.result16
-rw-r--r--mysql-test/main/grant5.result118
-rw-r--r--mysql-test/main/grant5.test52
-rw-r--r--mysql-test/main/grant_cache_no_prot.result14
-rw-r--r--mysql-test/main/grant_cache_ps_prot.result14
-rw-r--r--mysql-test/main/information_schema.result14
-rw-r--r--mysql-test/main/invisible_field_grant_completely.result2
-rw-r--r--mysql-test/main/invisible_field_grant_system.result2
-rw-r--r--mysql-test/main/ipv4_and_ipv6.result8
-rw-r--r--mysql-test/main/ipv4_as_ipv6.result24
-rw-r--r--mysql-test/main/ipv6.result12
-rw-r--r--mysql-test/main/locale.opt1
-rw-r--r--mysql-test/main/locale.result2
-rw-r--r--mysql-test/main/lock_user.result14
-rw-r--r--mysql-test/main/lowercase_table_grant.result8
-rw-r--r--mysql-test/main/mysql_upgrade.result14
-rw-r--r--mysql-test/main/mysqlbinlog.result4
-rw-r--r--mysql-test/main/mysqld--help,win.rdiff34
-rw-r--r--mysql-test/main/mysqld--help.result2
-rw-r--r--mysql-test/main/partition_grant.result4
-rw-r--r--mysql-test/main/partition_range.result44
-rw-r--r--mysql-test/main/partition_range.test46
-rw-r--r--mysql-test/main/password_expiration.result38
-rw-r--r--mysql-test/main/plugin_auth.result6
-rw-r--r--mysql-test/main/ps_grant.result36
-rw-r--r--mysql-test/main/set_password.result2
-rw-r--r--mysql-test/main/show_create_user.result14
-rw-r--r--mysql-test/main/skip_grants.result10
-rw-r--r--mysql-test/main/skip_name_resolve.result4
-rw-r--r--mysql-test/main/sp-security.result36
-rw-r--r--mysql-test/main/sp_notembedded.result22
-rw-r--r--mysql-test/main/system_mysql_db_507.result48
-rw-r--r--mysql-test/main/timezone_grant.result10
-rw-r--r--mysql-test/main/trigger_notembedded.result4
-rw-r--r--mysql-test/main/user_limits.result4
-rw-r--r--mysql-test/main/view_grant.result6
-rwxr-xr-xmysql-test/mysql-test-run.pl4
-rw-r--r--mysql-test/suite/binlog/r/binlog_grant.result2
-rw-r--r--mysql-test/suite/compat/oracle/r/sp-package-security.result36
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03.result116
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result176
-rw-r--r--mysql-test/suite/funcs_1/r/is_basics_mixed.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_column_privileges.result64
-rw-r--r--mysql-test/suite/funcs_1/r/is_schema_privileges.result32
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result32
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_constraints.result8
-rw-r--r--mysql-test/suite/funcs_1/r/is_table_privileges.result40
-rw-r--r--mysql-test/suite/funcs_1/r/is_triggers.result10
-rw-r--r--mysql-test/suite/funcs_1/r/is_user_privileges.result38
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03.result116
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result172
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03.result116
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result172
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result30
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_ps.result30
-rw-r--r--mysql-test/suite/galera/r/MW-336.result52
-rw-r--r--mysql-test/suite/galera/r/galera_forced_binlog_format.result4
-rw-r--r--mysql-test/suite/galera/r/galera_roles.result12
-rw-r--r--mysql-test/suite/galera/t/MW-336.test68
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result3
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test5
-rw-r--r--mysql-test/suite/innodb/r/innodb-blob.result6
-rw-r--r--mysql-test/suite/innodb/t/innodb-blob.test7
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug.result9
-rw-r--r--mysql-test/suite/innodb_fts/r/misc_debug2.result7
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug.test13
-rw-r--r--mysql-test/suite/innodb_fts/t/misc_debug2.test11
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_5_innodb.result12
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_5_myisam.result12
-rw-r--r--mysql-test/suite/parts/r/partition_exch_qa_6.result16
-rw-r--r--mysql-test/suite/perfschema/r/column_privilege.result2
-rw-r--r--mysql-test/suite/perfschema/r/privilege.result2
-rw-r--r--mysql-test/suite/perfschema/r/read_only.result12
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result8
-rw-r--r--mysql-test/suite/plugins/r/multiauth.result30
-rw-r--r--mysql-test/suite/roles/admin.result92
-rw-r--r--mysql-test/suite/roles/create_and_drop_role.result6
-rw-r--r--mysql-test/suite/roles/create_and_grant_role.result8
-rw-r--r--mysql-test/suite/roles/definer.result10
-rw-r--r--mysql-test/suite/roles/drop_routines.result64
-rw-r--r--mysql-test/suite/roles/flush_roles-17898.result14
-rw-r--r--mysql-test/suite/roles/grant-5771.result14
-rw-r--r--mysql-test/suite/roles/grant_empty.result4
-rw-r--r--mysql-test/suite/roles/grant_proxy-5526.result2
-rw-r--r--mysql-test/suite/roles/grant_revoke_current.result20
-rw-r--r--mysql-test/suite/roles/ip-6401.result4
-rw-r--r--mysql-test/suite/roles/prepare_stmt_with_role.result26
-rw-r--r--mysql-test/suite/roles/rebuild_role_grants.result18
-rw-r--r--mysql-test/suite/roles/recursive.result224
-rw-r--r--mysql-test/suite/roles/recursive_dbug.result224
-rw-r--r--mysql-test/suite/roles/revoke_all.result204
-rw-r--r--mysql-test/suite/roles/role_case_sensitive-10744.result10
-rw-r--r--mysql-test/suite/roles/rpl_definer.result28
-rw-r--r--mysql-test/suite/roles/set_and_drop.result8
-rw-r--r--mysql-test/suite/roles/set_default_role_clear.result10
-rw-r--r--mysql-test/suite/roles/set_default_role_for.result18
-rw-r--r--mysql-test/suite/roles/set_default_role_invalid.result10
-rw-r--r--mysql-test/suite/roles/set_default_role_new_connection.result20
-rw-r--r--mysql-test/suite/roles/set_role-13655.result22
-rw-r--r--mysql-test/suite/roles/set_role-9614.result20
-rw-r--r--mysql-test/suite/roles/set_role-database-recursive.result24
-rw-r--r--mysql-test/suite/roles/set_role-multiple-role.result52
-rw-r--r--mysql-test/suite/roles/set_role-recursive.result64
-rw-r--r--mysql-test/suite/roles/set_role-routine-simple.result38
-rw-r--r--mysql-test/suite/roles/set_role-simple.result12
-rw-r--r--mysql-test/suite/roles/set_role-table-column-priv.result28
-rw-r--r--mysql-test/suite/roles/set_role-table-simple.result28
-rw-r--r--mysql-test/suite/roles/show_grants.result92
-rw-r--r--mysql-test/suite/roles/show_grants_replicated.result18
-rw-r--r--mysql-test/suite/rpl/r/rpl_binlog_grant.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_do_grant.result58
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_grant.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_ignore_table.result66
-rw-r--r--mysql-test/suite/sys_vars/r/host_cache_size_auto.result2
-rw-r--r--mysql-test/suite/versioning/r/truncate_privilege.result14
-rw-r--r--mysql-test/suite/versioning/r/update.result3
-rw-r--r--mysql-test/suite/versioning/t/update.test3
-rw-r--r--scripts/mysqlhotcopy.sh2
-rw-r--r--sql/derror.cc8
-rw-r--r--sql/ha_partition.cc2
-rw-r--r--sql/ha_partition.h91
-rw-r--r--sql/log.cc34
-rw-r--r--sql/log.h15
-rw-r--r--sql/my_decimal.cc4
-rw-r--r--sql/my_decimal.h2
-rw-r--r--sql/mysqld.cc14
-rw-r--r--sql/opt_split.cc11
-rw-r--r--sql/sql_acl.cc88
-rw-r--r--sql/sql_parse.cc1
-rw-r--r--sql/sql_partition.cc26
-rw-r--r--sql/sys_vars.ic1
-rw-r--r--sql/table.cc1
-rw-r--r--storage/innobase/buf/buf0buf.cc8
-rw-r--r--storage/innobase/buf/buf0lru.cc8
-rw-r--r--storage/innobase/dict/dict0dict.cc7
-rw-r--r--storage/innobase/fil/fil0crypt.cc71
-rw-r--r--storage/innobase/fts/fts0opt.cc2
-rw-r--r--storage/innobase/handler/i_s.cc23
-rw-r--r--storage/innobase/include/hash0hash.h12
-rw-r--r--storage/innobase/include/mem0mem.h11
-rw-r--r--storage/innobase/include/mem0mem.ic28
-rw-r--r--storage/innobase/include/rem0rec.ic6
-rw-r--r--storage/innobase/mem/mem0mem.cc9
-rw-r--r--storage/innobase/row/row0mysql.cc21
-rw-r--r--storage/innobase/srv/srv0srv.cc6
-rw-r--r--storage/tokudb/CMakeLists.txt2
-rw-r--r--storage/tokudb/man/CMakeLists.txt2
-rw-r--r--storage/tokudb/man/tokuft_logprint.1 (renamed from man/tokuft_logprint.1)0
-rw-r--r--storage/tokudb/man/tokuftdump.1 (renamed from man/tokuftdump.1)0
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result12
-rw-r--r--support-files/CMakeLists.txt35
164 files changed, 2854 insertions, 2282 deletions
diff --git a/.gitignore b/.gitignore
index 631922339d8..40941e487a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -279,6 +279,8 @@ support-files/mysqld_multi.server
support-files/wsrep.cnf
support-files/wsrep_notify
support-files/policy/selinux/mysqld-safe.pp
+support-files/sysusers.conf
+support-files/tmpfiles.conf
support-files/mariadb.pp
tags
tests/async_queries
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake
index 5dd33b623d0..1dad91e05a5 100644
--- a/cmake/cpack_rpm.cmake
+++ b/cmake/cpack_rpm.cmake
@@ -105,6 +105,8 @@ SET(ignored
"%ignore /etc/systemd/system"
"%ignore /lib"
"%ignore /lib/security"
+ "%ignore /lib64"
+ "%ignore /lib64/security"
"%ignore ${CMAKE_INSTALL_PREFIX}"
"%ignore ${CMAKE_INSTALL_PREFIX}/bin"
"%ignore ${CMAKE_INSTALL_PREFIX}/include"
diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake
index ab19a7f0f11..49dceccb9d2 100644
--- a/cmake/install_layout.cmake
+++ b/cmake/install_layout.cmake
@@ -163,7 +163,7 @@ SET(INSTALL_UNIX_ADDRDIR_RPM "${INSTALL_MYSQLDATADIR_RPM}/mysql.sock"
SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system")
SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d")
SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d")
-SET(INSTALL_PAMDIR_RPM "/lib/security")
+SET(INSTALL_PAMDIR_RPM "/${INSTALL_LIBDIR_RPM}/security")
#
# DEB layout
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt
index 9ceda0c4c33..58c1efaebf1 100644
--- a/man/CMakeLists.txt
+++ b/man/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2012, Monty Program Ab
+# Copyright (c) 2012, 2020, MariaDB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,11 +21,11 @@ SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
mysql_secure_installation.1 mysql_setpermission.1
mysql_tzinfo_to_sql.1 mysql_upgrade.1
mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1
- mysqltest.1 perror.1 replace.1 resolve_stack_dump.1
+ perror.1 replace.1 resolve_stack_dump.1
resolveip.1 mariadb-service-convert.1
- mysqld_safe_helper.1 tokuftdump.1 wsrep_sst_common.1
+ mysqld_safe_helper.1 wsrep_sst_common.1
wsrep_sst_mysqldump.1 wsrep_sst_rsync.1
- galera_recovery.1 galera_new_cluster.1 tokuft_logprint.1
+ galera_recovery.1 galera_new_cluster.1
mysql_ldb.1
wsrep_sst_mariabackup.1 mbstream.1 mariabackup.1
wsrep_sst_rsync_wan.1)
@@ -36,7 +36,8 @@ SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1
mysql_plugin.1 mysql_embedded.1)
SET(MAN1_DEVEL mysql_config.1)
SET(MAN1_TEST mysql-stress-test.pl.1 mysql-test-run.pl.1 mysql_client_test.1
- mysqltest_embedded.1 mysql_client_test_embedded.1 my_safe_process.1)
+ mysqltest.1 mysqltest_embedded.1 mysql_client_test_embedded.1
+ my_safe_process.1)
INSTALL(FILES ${MAN1_SERVER} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesServer)
INSTALL(FILES ${MAN8_SERVER} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPagesServer)
diff --git a/mysql-test/main/connect.result b/mysql-test/main/connect.result
index ba8448b30ab..ee1844bc3ee 100644
--- a/mysql-test/main/connect.result
+++ b/mysql-test/main/connect.result
@@ -103,12 +103,12 @@ update mysql.user set plugin="", authentication_string="", password=old_password
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;
set password="";
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result
index fe074c2a8fd..7dea6a81e04 100644
--- a/mysql-test/main/derived_cond_pushdown.result
+++ b/mysql-test/main/derived_cond_pushdown.result
@@ -16823,6 +16823,95 @@ id username id userid logindate
2 user2 3 2 2017-06-19 12:17:02
set join_cache_level=default;
DROP TABLE t1,t2;
+#
+# MDEV-21614: potentially splittable materialized derived/view
+# within materialized semi-join
+#
+create table t1 (
+id int not null auto_increment primary key,
+a int not null
+) engine=myisam;
+create table t2 (
+id int not null auto_increment primary key,
+ro_id int not null,
+flag int not null, key (ro_id)
+) engine=myisam;
+insert into t1(a) select seq+100 from seq_1_to_20;
+insert into t2(ro_id,flag) select seq, 1 from seq_1_to_20;
+insert into t2(ro_id,flag) select seq, 0 from seq_1_to_20;
+create view v1 as
+select t1.* from t1 left join t2 on (t1.id = t2.ro_id AND t2.flag = 1)
+group by t1.id;
+select id, a from t1 where id in (select id from v1);
+id a
+1 101
+2 102
+3 103
+4 104
+5 105
+6 106
+7 107
+8 108
+9 109
+10 110
+11 111
+12 112
+13 113
+14 114
+15 115
+16 116
+17 117
+18 118
+19 119
+20 120
+explain extended select id, a from t1 where id in (select id from v1);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 20 100.00
+1 PRIMARY <derived3> ref key0 key0 4 test.t1.id 2 100.00 FirstMatch(t1)
+3 LATERAL DERIVED t1 eq_ref PRIMARY PRIMARY 4 test.t1.id 1 100.00
+3 LATERAL DERIVED t2 ref ro_id ro_id 4 test.t1.id 1 100.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a` from `test`.`t1` semi join (`test`.`v1`) where `v1`.`id` = `test`.`t1`.`id`
+select id, a from t1
+where id in (select id
+from (select t1.* from t1 left join t2
+on (t1.id = t2.ro_id AND t2.flag = 1)
+group by t1.id) dt);
+id a
+1 101
+2 102
+3 103
+4 104
+5 105
+6 106
+7 107
+8 108
+9 109
+10 110
+11 111
+12 112
+13 113
+14 114
+15 115
+16 116
+17 117
+18 118
+19 119
+20 120
+explain extended select id, a from t1
+where id in (select id
+from (select t1.* from t1 left join t2
+on (t1.id = t2.ro_id AND t2.flag = 1)
+group by t1.id) dt);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 20 100.00
+1 PRIMARY <derived3> ref key0 key0 4 test.t1.id 2 100.00 FirstMatch(t1)
+3 LATERAL DERIVED t1 eq_ref PRIMARY PRIMARY 4 test.t1.id 1 100.00
+3 LATERAL DERIVED t2 ref ro_id ro_id 4 test.t1.id 1 100.00 Using where
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a` from `test`.`t1` semi join ((/* select#3 */ select `test`.`t1`.`id` AS `id`,`test`.`t1`.`a` AS `a` from `test`.`t1` left join `test`.`t2` on(`test`.`t2`.`ro_id` = `test`.`t1`.`id` and `test`.`t2`.`flag` = 1) where `test`.`t1`.`id` = `test`.`t1`.`id` group by `test`.`t1`.`id`) `dt`) where `dt`.`id` = `test`.`t1`.`id`
+drop view v1;
+drop table t1,t2;
# End of 10.3 tests
#
# MDEV-18679: materialized view with SELECT S containing materialized
diff --git a/mysql-test/main/derived_cond_pushdown.test b/mysql-test/main/derived_cond_pushdown.test
index 1441989e2cc..152a130b8af 100644
--- a/mysql-test/main/derived_cond_pushdown.test
+++ b/mysql-test/main/derived_cond_pushdown.test
@@ -1,3 +1,4 @@
+--source include/have_sequence.inc
--source include/default_optimizer_switch.inc
let $no_pushdown= set statement optimizer_switch='condition_pushdown_for_derived=off' for;
set @@join_buffer_size=256*1024;
@@ -3328,6 +3329,48 @@ set join_cache_level=default;
DROP TABLE t1,t2;
+
+--echo #
+--echo # MDEV-21614: potentially splittable materialized derived/view
+--echo # within materialized semi-join
+--echo #
+
+create table t1 (
+ id int not null auto_increment primary key,
+ a int not null
+) engine=myisam;
+
+create table t2 (
+ id int not null auto_increment primary key,
+ ro_id int not null,
+ flag int not null, key (ro_id)
+) engine=myisam;
+
+insert into t1(a) select seq+100 from seq_1_to_20;
+insert into t2(ro_id,flag) select seq, 1 from seq_1_to_20;
+insert into t2(ro_id,flag) select seq, 0 from seq_1_to_20;
+
+create view v1 as
+select t1.* from t1 left join t2 on (t1.id = t2.ro_id AND t2.flag = 1)
+ group by t1.id;
+
+let $q1=
+select id, a from t1 where id in (select id from v1);
+eval $q1;
+eval explain extended $q1;
+
+let $q2=
+select id, a from t1
+ where id in (select id
+ from (select t1.* from t1 left join t2
+ on (t1.id = t2.ro_id AND t2.flag = 1)
+ group by t1.id) dt);
+eval $q2;
+eval explain extended $q2;
+
+drop view v1;
+drop table t1,t2;
+
--echo # End of 10.3 tests
--echo #
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 d544c97e636..e83083be4ed 100644
--- a/mysql-test/main/grant.result
+++ b/mysql-test/main/grant.result
@@ -14,8 +14,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
@@ -67,27 +67,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';
@@ -143,7 +143,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
@@ -195,48 +195,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';
@@ -249,21 +249,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
@@ -272,22 +272,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";
@@ -306,16 +306,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;
@@ -328,7 +328,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;
@@ -336,44 +336,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
@@ -394,8 +394,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 ÂÄ;
@@ -404,20 +404,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 ÂÄ;
@@ -476,7 +476,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;
@@ -493,8 +493,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
@@ -504,7 +504,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;
@@ -656,9 +656,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
@@ -669,9 +669,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;
@@ -700,9 +700,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
@@ -713,9 +713,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;
@@ -734,9 +734,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
@@ -747,9 +747,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;
@@ -778,27 +778,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 '%'
@@ -809,12 +809,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';
@@ -854,18 +854,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
@@ -878,26 +878,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
@@ -905,21 +905,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
@@ -931,39 +931,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
@@ -975,19 +975,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@'';
@@ -996,14 +996,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
@@ -1017,14 +1017,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 '%'
@@ -1139,8 +1139,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;
@@ -1159,8 +1159,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;
@@ -1171,8 +1171,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;
@@ -1180,9 +1180,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;
@@ -1194,9 +1194,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;
@@ -1532,9 +1532,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
@@ -1565,7 +1565,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,,;
@@ -1599,11 +1599,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
@@ -1645,7 +1645,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';
@@ -1669,11 +1669,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
@@ -1813,8 +1813,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
@@ -1845,14 +1845,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;
@@ -1873,19 +1873,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;
@@ -1958,8 +1958,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;
@@ -1971,7 +1971,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.
@@ -1981,8 +1981,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;
@@ -1997,7 +1997,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.
@@ -2007,8 +2007,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;
@@ -2023,7 +2023,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.
@@ -2033,8 +2033,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;
@@ -2049,7 +2049,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.
@@ -2059,8 +2059,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;
@@ -2075,7 +2075,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.
@@ -2085,8 +2085,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;
@@ -2101,7 +2101,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.
@@ -2111,8 +2111,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;
@@ -2127,7 +2127,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.
@@ -2137,8 +2137,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;
@@ -2153,7 +2153,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.
@@ -2163,8 +2163,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;
@@ -2179,7 +2179,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.
@@ -2189,8 +2189,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;
@@ -2205,7 +2205,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.
@@ -2215,8 +2215,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;
@@ -2231,7 +2231,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.
@@ -2241,8 +2241,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;
@@ -2257,7 +2257,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.
@@ -2267,8 +2267,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;
@@ -2283,7 +2283,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.
@@ -2293,8 +2293,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;
@@ -2309,7 +2309,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.
@@ -2319,8 +2319,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;
@@ -2335,7 +2335,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.
@@ -2345,8 +2345,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;
@@ -2361,7 +2361,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.
@@ -2371,8 +2371,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;
@@ -2387,7 +2387,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.
@@ -2397,8 +2397,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;
@@ -2413,7 +2413,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.
@@ -2423,8 +2423,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;
@@ -2439,7 +2439,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.
@@ -2449,8 +2449,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;
@@ -2465,7 +2465,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.
@@ -2475,8 +2475,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;
@@ -2491,7 +2491,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.
@@ -2501,8 +2501,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;
@@ -2517,7 +2517,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.
@@ -2527,8 +2527,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;
@@ -2543,7 +2543,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.
@@ -2553,8 +2553,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;
@@ -2569,7 +2569,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.
@@ -2579,8 +2579,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;
@@ -2595,7 +2595,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.
@@ -2625,7 +2625,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;
#
@@ -2668,28 +2668,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;
@@ -2704,7 +2704,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
@@ -2761,11 +2761,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;
#
# End of 10.3 tests
diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result
index 5d168a04455..d238d261006 100644
--- a/mysql-test/main/grant2.result
+++ b/mysql-test/main/grant2.result
@@ -60,12 +60,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\_%';
@@ -89,8 +89,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;
@@ -104,8 +104,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'
@@ -199,13 +199,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,plugin,authentication_string from mysql.user where user like 'mysqltest_%';
Host User Password plugin authentication_string
@@ -240,10 +240,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'@'%'
@@ -293,19 +293,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;
@@ -325,8 +325,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,plugin,authentication_string from mysql.user where user like 'mysqltest_%' ;
ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for table 'user'
insert into mysql.global_priv set host='%', user='mysqltest_B';
@@ -346,8 +346,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 1bc6e7572c5..63e343aaf4d 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 2f16c5d630a..43b58b82231 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,6 +25,101 @@ ERROR HY000: Table 'procs_priv' was not locked with LOCK TABLES
REVOKE PROCESS ON *.* FROM u;
ERROR HY000: Table 'db' 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
create user u1@h identified with 'mysql_native_password' using 'pwd';
ERROR HY000: Password hash should be a 41-digit hexadecimal number
create user u1@h identified with 'mysql_native_password' using password('pwd');
@@ -61,28 +156,28 @@ update mysql.global_priv set priv=json_set(priv, '$.plugin', 'nonexistent') wher
flush privileges;
show create user u1@h;
CREATE USER for u1@h
-CREATE USER 'u1'@'h' IDENTIFIED BY PASSWORD 'bad'
+CREATE USER `u1`@`h` IDENTIFIED BY PASSWORD 'bad'
show create user u2@h;
CREATE USER for u2@h
-CREATE USER 'u2'@'h' IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
+CREATE USER `u2`@`h` IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
show create user u3@h;
CREATE USER for u3@h
-CREATE USER 'u3'@'h' IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
+CREATE USER `u3`@`h` IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
show create user u4@h;
CREATE USER for u4@h
-CREATE USER 'u4'@'h' IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
+CREATE USER `u4`@`h` IDENTIFIED BY PASSWORD '*975B2CD4FF9AE554FE8AD33168FBFC326D2021DD'
show create user u5@h;
CREATE USER for u5@h
-CREATE USER 'u5'@'h' IDENTIFIED BY PASSWORD 'bad'
+CREATE USER `u5`@`h` IDENTIFIED BY PASSWORD 'bad'
show create user u6@h;
CREATE USER for u6@h
-CREATE USER 'u6'@'h' IDENTIFIED BY PASSWORD '78a302dd267f6044'
+CREATE USER `u6`@`h` IDENTIFIED BY PASSWORD '78a302dd267f6044'
show create user u7@h;
CREATE USER for u7@h
-CREATE USER 'u7'@'h' IDENTIFIED BY PASSWORD '78a302dd267f6044'
+CREATE USER `u7`@`h` IDENTIFIED BY PASSWORD '78a302dd267f6044'
show create user u8@h;
CREATE USER for u8@h
-CREATE USER 'u8'@'h' IDENTIFIED VIA nonexistent USING '78a302dd267f6044'
+CREATE USER `u8`@`h` IDENTIFIED VIA nonexistent USING '78a302dd267f6044'
grant select on *.* to u1@h;
grant select on *.* to u2@h;
grant select on *.* to u3@h;
@@ -130,3 +225,4 @@ drop user twg@'%';
insert mysql.tables_priv (host,db,user,table_name,grantor,table_priv) values ('localhost','','otto','t1','root@localhost','select');
flush privileges;
delete from mysql.tables_priv where db='';
+# End of 10.4 tests
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index 43f5b9c180f..307549ec9d8 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -34,6 +34,56 @@ REVOKE EXECUTE ON PROCEDURE sp FROM u;
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
+
#
# MDEV-12321 authentication plugin: SET PASSWORD support
#
@@ -131,3 +181,5 @@ drop user twg@'%';
insert mysql.tables_priv (host,db,user,table_name,grantor,table_priv) values ('localhost','','otto','t1','root@localhost','select');
flush privileges;
delete from mysql.tables_priv where db='';
+
+--echo # End of 10.4 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 b4d2d065d4a..e69a24e5422 100644
--- a/mysql-test/main/information_schema.result
+++ b/mysql-test/main/information_schema.result
@@ -1052,8 +1052,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
@@ -1067,8 +1067,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
@@ -1082,8 +1082,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;
@@ -1106,7 +1106,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/locale.opt b/mysql-test/main/locale.opt
new file mode 100644
index 00000000000..0ea17c2e0a8
--- /dev/null
+++ b/mysql-test/main/locale.opt
@@ -0,0 +1 @@
+--lc-messages=de_DE
diff --git a/mysql-test/main/locale.result b/mysql-test/main/locale.result
index b750d038205..f136e9e99ab 100644
--- a/mysql-test/main/locale.result
+++ b/mysql-test/main/locale.result
@@ -51,7 +51,7 @@ DROP TABLE t1;
#
SET lc_messages=sr_YU;
Warnings:
-Warning 1287 'sr_YU' is deprecated and will be removed in a future release. Please use sr_RS instead
+Warning 1287 'sr_YU' ist veraltet. Bitte benutzen Sie 'sr_RS'
SHOW VARIABLES LIKE 'lc_messages';
Variable_name Value
lc_messages sr_RS
diff --git a/mysql-test/main/lock_user.result b/mysql-test/main/lock_user.result
index a8740e8ad37..bc32ee986b3 100644
--- a/mysql-test/main/lock_user.result
+++ b/mysql-test/main/lock_user.result
@@ -41,12 +41,12 @@ Note 1396 Operation ALTER USER failed for 'inexistentUser'@'localhost'
#
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
create user user1@localhost account lock;
ERROR HY000: Operation CREATE USER failed for 'user1'@'localhost'
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
#
# Passing multiple users should lock them all
#
@@ -83,19 +83,19 @@ localhost user1 0
#
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
alter user user1@localhost account lock;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' ACCOUNT LOCK
+CREATE USER `user1`@`localhost` ACCOUNT LOCK
alter user user1@localhost account unlock;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
create user newuser@localhost account lock;
show create user newuser@localhost;
CREATE USER for newuser@localhost
-CREATE USER 'newuser'@'localhost' ACCOUNT LOCK
+CREATE USER `newuser`@`localhost` ACCOUNT LOCK
drop user newuser@localhost;
#
# Users should be able to lock themselves
@@ -121,7 +121,7 @@ connection con1;
alter user user1@localhost account unlock;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
disconnect con1;
connection default;
#
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 bd70c71e041..f71ce087ba1 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,8 +586,8 @@ 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%';
drop table mysql.global_priv;
@@ -597,7 +597,7 @@ drop view mysql.user_bak;
create user 'user3'@'localhost' identified with mysql_native_password as password('a_password');
show create user user3@localhost;
CREATE USER for user3@localhost
-CREATE USER 'user3'@'localhost' IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
+CREATE USER `user3`@`localhost` IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
update mysql.user set password=authentication_string, authentication_string='' where user='user3';
select password,plugin,authentication_string from mysql.user where user='user3';
password plugin authentication_string
@@ -605,7 +605,7 @@ password plugin authentication_string
flush privileges;
show create user user3@localhost;
CREATE USER for user3@localhost
-CREATE USER 'user3'@'localhost' IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA' PASSWORD EXPIRE NEVER
+CREATE USER `user3`@`localhost` IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA' PASSWORD EXPIRE NEVER
connect con1,localhost,user3,a_password;
select current_user();
current_user()
@@ -615,7 +615,7 @@ connection default;
# mysql_upgrade --force --silent 2>&1
show create user user3@localhost;
CREATE USER for user3@localhost
-CREATE USER 'user3'@'localhost' IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
+CREATE USER `user3`@`localhost` IDENTIFIED BY PASSWORD '*5DC1D11F45824A9DD613961F05C1EC1E7A1601AA'
connect con1,localhost,user3,a_password;
select current_user();
current_user()
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/mysqld--help,win.rdiff b/mysql-test/main/mysqld--help,win.rdiff
index 6aba3acab28..77f6f76858f 100644
--- a/mysql-test/main/mysqld--help,win.rdiff
+++ b/mysql-test/main/mysqld--help,win.rdiff
@@ -1,6 +1,6 @@
---- mysqld--help.result 2018-08-12 00:10:13.694793500 +0100
-+++ mysqld--help,win.reject 2018-08-16 20:31:08.353317200 +0100
-@@ -386,7 +386,6 @@
+--- a/mysql-test/r/mysqld--help.result
++++ b/mysql-test/r/mysqld--help.result
+@@ -419,7 +419,6 @@
The number of segments in a key cache
-L, --language=name Client error messages in given language. May be given as
a full path. Deprecated. Use --lc-messages-dir instead.
@@ -8,7 +8,7 @@
--lc-messages=name Set the language used for the error messages.
-L, --lc-messages-dir=name
Directory where error messages are
-@@ -608,6 +607,7 @@
+@@ -647,6 +646,7 @@
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
DATETIME, TIMESTAMP columns.
(Defaults to on; use --skip-mysql56-temporal-format to disable.)
@@ -16,7 +16,7 @@
--net-buffer-length=#
Buffer length for TCP/IP and socket communication
--net-read-timeout=#
-@@ -1188,6 +1188,10 @@
+@@ -1236,6 +1236,10 @@
Log slow queries to given log file. Defaults logging to
'hostname'-slow.log. Must be enabled to activate other
slow log options
@@ -27,15 +27,15 @@
--socket=name Socket file to use for connection
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
-@@ -1207,6 +1211,7 @@
- EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT
+@@ -1260,6 +1264,7 @@
+ deleting or updating every row in a table.
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
+ --standalone Dummy option to start as a standalone program (NT).
--standard-compliant-cte
Allow only CTEs compliant to SQL standard
(Defaults to on; use --skip-standard-compliant-cte to disable.)
-@@ -1277,6 +1282,11 @@
+@@ -1330,6 +1335,11 @@
--thread-pool-max-threads=#
Maximum allowed number of worker threads in the thread
pool
@@ -47,7 +47,7 @@
--thread-pool-oversubscribe=#
How many additional active worker threads in a group are
allowed.
-@@ -1315,8 +1325,8 @@
+@@ -1370,8 +1380,8 @@
automatically convert it to an on-disk MyISAM or Aria
table.
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
@@ -58,7 +58,7 @@
--transaction-alloc-block-size=#
Allocation block size for transactions to be stored in
binary log
-@@ -1451,7 +1461,6 @@
+@@ -1513,7 +1523,6 @@
key-cache-division-limit 100
key-cache-file-hash-size 512
key-cache-segments 0
@@ -66,7 +66,7 @@
lc-messages en_US
lc-messages-dir MYSQL_SHAREDIR/
lc-time-names en_US
-@@ -1523,6 +1532,7 @@
+@@ -1587,6 +1596,7 @@
myisam-stats-method NULLS_UNEQUAL
myisam-use-mmap FALSE
mysql56-temporal-format TRUE
@@ -74,15 +74,15 @@
net-buffer-length 16384
net-read-timeout 30
net-retry-count 10
-@@ -1660,6 +1670,7 @@
+@@ -1726,6 +1736,7 @@
slave-type-conversions
slow-launch-time 2
slow-query-log FALSE
+slow-start-timeout 15000
sort-buffer-size 2097152
sql-mode STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
- stack-trace TRUE
-@@ -1674,9 +1685,9 @@
+ sql-safe-updates FALSE
+@@ -1741,10 +1752,10 @@
sync-relay-log-info 10000
sysdate-is-now FALSE
system-versioning-alter-history ERROR
@@ -90,11 +90,13 @@
+table-cache 2000
table-definition-cache 400
-table-open-cache 421
+-table-open-cache-instances 1
+table-open-cache 2000
- table-open-cache-instances 8
++table-open-cache-instances 8
tc-heuristic-recover OFF
tcp-keepalive-interval 0
-@@ -1686,6 +1697,8 @@
+ tcp-keepalive-probes 0
+@@ -1753,6 +1764,8 @@
thread-cache-size 151
thread-pool-idle-timeout 60
thread-pool-max-threads 65536
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index f9dfa604d23..f184b1b60ff 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -1744,7 +1744,7 @@ system-versioning-alter-history ERROR
table-cache 421
table-definition-cache 400
table-open-cache 421
-table-open-cache-instances 8
+table-open-cache-instances 1
tc-heuristic-recover OFF
tcp-keepalive-interval 0
tcp-keepalive-probes 0
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/partition_range.result b/mysql-test/main/partition_range.result
index 2cb9e3f4ab8..261a05e7023 100644
--- a/mysql-test/main/partition_range.result
+++ b/mysql-test/main/partition_range.result
@@ -1015,3 +1015,47 @@ select * from t1 partition (p1);
d
2000-01-01 00:00:01.000000
DROP TABLE t1, t2;
+#
+# MDEV-21195 INSERT chooses wrong partition for RANGE partitioning by DECIMAL column
+#
+create or replace table t (
+d decimal(2,1)) partition by range (d)
+(partition p1 values less than (10));
+insert into t values (9.9);
+create or replace table t (
+d decimal(2,1)) partition by range (d)
+(partition p1 values less than (10),
+partition p2 values less than (20));
+insert into t values (9.9);
+select * from t partition (p1);
+d
+9.9
+select * from t partition (p2);
+d
+create or replace table t (
+d decimal(2,1)) partition by range (d)
+(partition p1 values less than (-3));
+insert into t values (-3.3);
+create or replace table t (
+d decimal(2,1)) partition by range (d+1)
+(partition p1 values less than (10),
+partition p2 values less than (20));
+insert into t values (8.9);
+select * from t partition (p1);
+d
+8.9
+select * from t partition (p2);
+d
+set time_zone='+00:00';
+create or replace table t (
+d timestamp(1)) partition by range (unix_timestamp(d))
+(partition p1 values less than (1577836800),
+partition p2 values less than (2000000000));
+insert into t values (from_unixtime(1577836799.9));
+select * from t partition (p1);
+d
+2019-12-31 23:59:59.9
+select * from t partition (p2);
+d
+set time_zone=default;
+drop table t;
diff --git a/mysql-test/main/partition_range.test b/mysql-test/main/partition_range.test
index 37702db052b..52497764241 100644
--- a/mysql-test/main/partition_range.test
+++ b/mysql-test/main/partition_range.test
@@ -1001,3 +1001,49 @@ select * from t1 partition (p0);
select * from t1 partition (p1);
DROP TABLE t1, t2;
+
+--echo #
+--echo # MDEV-21195 INSERT chooses wrong partition for RANGE partitioning by DECIMAL column
+--echo #
+create or replace table t (
+ d decimal(2,1)) partition by range (d)
+ (partition p1 values less than (10));
+
+insert into t values (9.9);
+
+create or replace table t (
+ d decimal(2,1)) partition by range (d)
+ (partition p1 values less than (10),
+ partition p2 values less than (20));
+
+insert into t values (9.9);
+select * from t partition (p1);
+select * from t partition (p2);
+
+create or replace table t (
+ d decimal(2,1)) partition by range (d)
+ (partition p1 values less than (-3));
+
+insert into t values (-3.3);
+
+create or replace table t (
+ d decimal(2,1)) partition by range (d+1)
+ (partition p1 values less than (10),
+ partition p2 values less than (20));
+
+insert into t values (8.9);
+select * from t partition (p1);
+select * from t partition (p2);
+
+set time_zone='+00:00';
+create or replace table t (
+ d timestamp(1)) partition by range (unix_timestamp(d))
+ (partition p1 values less than (1577836800),
+ partition p2 values less than (2000000000));
+
+insert into t values (from_unixtime(1577836799.9));
+select * from t partition (p1);
+select * from t partition (p2);
+
+set time_zone=default;
+drop table t;
diff --git a/mysql-test/main/password_expiration.result b/mysql-test/main/password_expiration.result
index 73c436aecd2..bb39d8788dc 100644
--- a/mysql-test/main/password_expiration.result
+++ b/mysql-test/main/password_expiration.result
@@ -103,32 +103,32 @@ drop user user1@localhost;
create user user1@localhost;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
alter user user1@localhost password expire;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
set password for user1@localhost= password('');
alter user user1@localhost password expire default;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
alter user user1@localhost password expire never;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE NEVER
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
alter user user1@localhost password expire interval 123 day;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE INTERVAL 123 DAY
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
alter user user1@localhost password expire;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
set password for user1@localhost= password('');
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE INTERVAL 123 DAY
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
drop user user1@localhost;
#
# Incorrect INTERVAL values should be rejected
@@ -141,52 +141,52 @@ ERROR HY000: Incorrect DAY value: '0'
create user user1@localhost;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
flush privileges;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE NEVER
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
alter user user1@localhost password expire;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
flush privileges;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
set password for user1@localhost= password('');
alter user user1@localhost password expire default;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
flush privileges;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE NEVER
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
alter user user1@localhost password expire never;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE NEVER
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
flush privileges;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE NEVER
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
alter user user1@localhost password expire interval 123 day;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE INTERVAL 123 DAY
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
flush privileges;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE NEVER
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE NEVER
alter user user1@localhost password expire;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
flush privileges;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' PASSWORD EXPIRE
+CREATE USER `user1`@`localhost` PASSWORD EXPIRE
set global disconnect_on_expired_password=ON;
connect(localhost,user1,,test,MYSQL_PORT,MYSQL_SOCK);
connect con1,localhost,user1;
diff --git a/mysql-test/main/plugin_auth.result b/mysql-test/main/plugin_auth.result
index 8472891cd44..244e048c517 100644
--- a/mysql-test/main/plugin_auth.result
+++ b/mysql-test/main/plugin_auth.result
@@ -178,18 +178,18 @@ connection default;
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 bb1124e09d4..eef7c6eccea 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 1205b658b6e..e7d68041a1d 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 'mysql_old_password' as '0123456789ABCDEF';
show create user foo2@test;
CREATE USER for foo2@test
-CREATE USER 'foo2'@'test' IDENTIFIED BY PASSWORD '0123456789ABCDEF'
+CREATE USER `foo2`@`test` IDENTIFIED BY PASSWORD '0123456789ABCDEF'
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/skip_grants.result b/mysql-test/main/skip_grants.result
index 5ecb783ac43..154f77fff76 100644
--- a/mysql-test/main/skip_grants.result
+++ b/mysql-test/main/skip_grants.result
@@ -94,21 +94,21 @@ ERROR HY000: The MariaDB server is running with the --skip-grant-tables option s
flush privileges;
show create user root@localhost;
CREATE USER for root@localhost
-CREATE USER 'root'@'localhost'
+CREATE USER `root`@`localhost`
show create user bar@foo;
CREATE USER for bar@foo
-CREATE USER 'bar'@'foo'
+CREATE USER `bar`@`foo`
show create user baz@baz;
CREATE USER for baz@baz
-CREATE USER 'baz'@'baz' IDENTIFIED VIA baz
+CREATE USER `baz`@`baz` IDENTIFIED VIA baz
set password for bar@foo = password("pass word");
show create user bar@foo;
CREATE USER for bar@foo
-CREATE USER 'bar'@'foo' IDENTIFIED BY PASSWORD '*EDBBEA7F4E7B5D8B0BC8D7AC5D1936FB7DA10611'
+CREATE USER `bar`@`foo` IDENTIFIED BY PASSWORD '*EDBBEA7F4E7B5D8B0BC8D7AC5D1936FB7DA10611'
alter user baz@baz identified with mysql_native_password as password("baz");
show create user baz@baz;
CREATE USER for baz@baz
-CREATE USER 'baz'@'baz' IDENTIFIED BY PASSWORD '*E52096EF8EB0240275A7FE9E069101C33F98CF07'
+CREATE USER `baz`@`baz` IDENTIFIED BY PASSWORD '*E52096EF8EB0240275A7FE9E069101C33F98CF07'
drop user bar@foo;
drop user baz@baz;
# restart
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 217fae0538e..5050955c806 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;
@@ -721,14 +721,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;
@@ -773,12 +773,12 @@ set password=password('foobar');
create procedure sp1() select 1;
show grants;
Grants for u1@localhost
-GRANT ALL PRIVILEGES ON *.* TO 'u1'@'localhost' IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
+GRANT ALL PRIVILEGES ON *.* TO `u1`@`localhost` IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
grant execute on procedure sp1 to current_user() identified by 'barfoo';
show grants;
Grants for u1@localhost
-GRANT ALL PRIVILEGES ON *.* TO 'u1'@'localhost' IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
-GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO 'u1'@'localhost'
+GRANT ALL PRIVILEGES ON *.* TO `u1`@`localhost` IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
+GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO `u1`@`localhost`
drop procedure sp1;
disconnect u1;
connection default;
diff --git a/mysql-test/main/sp_notembedded.result b/mysql-test/main/sp_notembedded.result
index 518dfc6bfdb..3cf066f5b4c 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;
@@ -328,21 +328,21 @@ update mysql.user set authentication_string = replace(authentication_string, '*'
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/system_mysql_db_507.result b/mysql-test/main/system_mysql_db_507.result
index 767b8fee102..00b53a5798d 100644
--- a/mysql-test/main/system_mysql_db_507.result
+++ b/mysql-test/main/system_mysql_db_507.result
@@ -79,13 +79,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;
@@ -99,13 +99,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;
@@ -119,13 +119,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.
#
@@ -134,26 +134,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.
#
@@ -177,46 +177,46 @@ connect con1,localhost,user1;
ERROR HY000: Access denied, this account is locked
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost' ACCOUNT LOCK
+CREATE USER `user1`@`localhost` ACCOUNT LOCK
alter user user1@localhost account unlock;
connect con1,localhost,user1;
disconnect con1;
connection default;
show create user user1@localhost;
CREATE USER for user1@localhost
-CREATE USER 'user1'@'localhost'
+CREATE USER `user1`@`localhost`
#
# Test password expiration fields are loaded correctly
#
create user user@localhost;
show create user user@localhost;
CREATE USER for user@localhost
-CREATE USER 'user'@'localhost'
+CREATE USER `user`@`localhost`
alter user user@localhost password expire;
show create user user@localhost;
CREATE USER for user@localhost
-CREATE USER 'user'@'localhost' PASSWORD EXPIRE
+CREATE USER `user`@`localhost` PASSWORD EXPIRE
set password for user@localhost= password('');
alter user user@localhost password expire default;
show create user user@localhost;
CREATE USER for user@localhost
-CREATE USER 'user'@'localhost'
+CREATE USER `user`@`localhost`
alter user user@localhost password expire never;
show create user user@localhost;
CREATE USER for user@localhost
-CREATE USER 'user'@'localhost' PASSWORD EXPIRE NEVER
+CREATE USER `user`@`localhost` PASSWORD EXPIRE NEVER
alter user user@localhost password expire interval 123 day;
show create user user@localhost;
CREATE USER for user@localhost
-CREATE USER 'user'@'localhost' PASSWORD EXPIRE INTERVAL 123 DAY
+CREATE USER `user`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
alter user user@localhost password expire;
show create user user@localhost;
CREATE USER for user@localhost
-CREATE USER 'user'@'localhost' PASSWORD EXPIRE
+CREATE USER `user`@`localhost` PASSWORD EXPIRE
set password for user@localhost= password('');
show create user user@localhost;
CREATE USER for user@localhost
-CREATE USER 'user'@'localhost' PASSWORD EXPIRE INTERVAL 123 DAY
+CREATE USER `user`@`localhost` PASSWORD EXPIRE INTERVAL 123 DAY
drop user user@localhost;
#
# Reset to final original state.
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 2fa898d9060..8af27de141f 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/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 6ee8e926ad4..f4bb4b7b921 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -4753,8 +4753,8 @@ sub extract_warning_lines ($$) {
qr/InnoDB: Cannot open .*ib_buffer_pool.* for reading: No such file or directory*/,
qr/InnoDB: Table .*mysql.*innodb_table_stats.* not found./,
qr/InnoDB: User stopword table .* does not exist./,
- qr/Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+/
-
+ qr/Dump thread [0-9]+ last sent to server [0-9]+ binlog file:pos .+/,
+ qr/Detected table cache mutex contention at instance .* waits. Additional table cache instance cannot be activated: consider raising table_open_cache_instances. Number of active instances/
);
my $matched_lines= [];
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 307c14792a9..37fd191d979 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 bacc106a1be..f2fd28b2a77 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -194,10 +194,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%'
@@ -205,7 +205,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;
@@ -217,7 +217,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';
@@ -237,12 +237,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%'
@@ -256,9 +256,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;
@@ -270,13 +270,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%'
@@ -288,8 +288,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 bc0f9a724a1..e0b861c8589 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 c405ec19af4..f7a83dd3ddb 100644
--- a/mysql-test/suite/funcs_1/r/is_user_privileges.result
+++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result
@@ -194,9 +194,9 @@ json_detailed(priv) {
}
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`.`global_priv` 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`.`global_priv` TO `testuser1`@`localhost`
# Now add SELECT on *.* to testuser1;
connection default;
@@ -332,9 +332,9 @@ json_detailed(priv) {
}
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`.`global_priv` 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`.`global_priv` TO `testuser1`@`localhost`
connect testuser2, localhost, testuser2, , db_datadict;
SELECT * FROM information_schema.user_privileges
WHERE grantee LIKE '''testuser%'''
@@ -352,7 +352,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user;
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'global_priv'
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%'''
@@ -366,7 +366,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user;
ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'global_priv'
SHOW GRANTS;
Grants for testuser3@localhost
-GRANT USAGE ON *.* TO 'testuser3'@'localhost'
+GRANT USAGE ON *.* TO `testuser3`@`localhost`
# Revoke privileges from testuser1;
connection default;
@@ -429,7 +429,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user;
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
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
@@ -444,7 +444,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user;
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
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'
@@ -533,9 +533,9 @@ json_detailed(priv) {
}
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`.`global_priv` 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`.`global_priv` 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;
@@ -574,9 +574,9 @@ json_detailed(priv) {
}
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`.`global_priv` 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`.`global_priv` TO `testuser1`@`localhost`
CREATE TABLE tb_57 ( c1 TEXT )
ENGINE = <other_engine_type>;
@@ -641,7 +641,7 @@ WHERE user LIKE 'testuser%' ORDER BY host, user;
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
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;
@@ -673,7 +673,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''';
@@ -687,7 +687,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/MW-336.result b/mysql-test/suite/galera/r/MW-336.result
index 09c58d0cafe..8996b85c77c 100644
--- a/mysql-test/suite/galera/r/MW-336.result
+++ b/mysql-test/suite/galera/r/MW-336.result
@@ -4,14 +4,27 @@ connection node_1;
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
# Set slave threads to 10 step 1
+SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+EXPECT_10
+10
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
INSERT INTO t1 VALUES (1);
connection node_1;
+# Wait until one of the appliers has exited
+SELECT VARIABLE_VALUE AS EXPECT_9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+EXPECT_9
+9
SET GLOBAL wsrep_slave_threads = 10;
# Set slave threads to 10 step 2
+SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+EXPECT_10
+10
SET GLOBAL wsrep_slave_threads = 20;
# Set slave threads to 20
+SELECT VARIABLE_VALUE AS EXPECT_20 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+EXPECT_20
+20
SET GLOBAL wsrep_slave_threads = 1;
connection node_2;
INSERT INTO t1 VALUES (1);
@@ -24,28 +37,47 @@ INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
-connection node_1;
-SET GLOBAL wsrep_slave_threads = 10;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
-11
-# Set slave threads to 10 step 3
-connection node_2;
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
-INSERT INTO t1 VALUES (15);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
+connection node_1;
+# Wait until 19 of the appliers has exited
+SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+EXPECT_1
+1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+20
+SET GLOBAL wsrep_slave_threads = 10;
+# Set slave threads to 10 step 3
+SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+EXPECT_10
+10
+connection node_1;
+SET GLOBAL wsrep_slave_threads = 1;
+connection node_2;
INSERT INTO t1 VALUES (21);
INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+INSERT INTO t1 VALUES (25);
+INSERT INTO t1 VALUES (26);
+INSERT INTO t1 VALUES (27);
+INSERT INTO t1 VALUES (28);
+INSERT INTO t1 VALUES (29);
+INSERT INTO t1 VALUES (30);
connection node_1;
+# Wait until slave threads back to 1
+SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+EXPECT_1
+1
SELECT COUNT(*) FROM t1;
COUNT(*)
-23
-SET GLOBAL wsrep_slave_threads = 1;
+30
DROP TABLE t1;
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 8f79c3a19a1..4132d32c418 100644
--- a/mysql-test/suite/galera/r/galera_forced_binlog_format.result
+++ b/mysql-test/suite/galera/r/galera_forced_binlog_format.result
@@ -28,8 +28,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 b1124b597c5..35487185db2 100644
--- a/mysql-test/suite/galera/r/galera_roles.result
+++ b/mysql-test/suite/galera/r/galera_roles.result
@@ -28,8 +28,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;
@@ -64,8 +64,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;
@@ -131,7 +131,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
@@ -153,7 +153,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/galera/t/MW-336.test b/mysql-test/suite/galera/t/MW-336.test
index 0e92094da6c..83943c7d8ea 100644
--- a/mysql-test/suite/galera/t/MW-336.test
+++ b/mysql-test/suite/galera/t/MW-336.test
@@ -17,20 +17,31 @@ SET GLOBAL wsrep_slave_threads = 10;
--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
+SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
INSERT INTO t1 VALUES (1);
--connection node_1
+--echo # Wait until one of the appliers has exited
+--let $wait_condition = SELECT VARIABLE_VALUE = 9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 9 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
+
+SELECT VARIABLE_VALUE AS EXPECT_9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+
SET GLOBAL wsrep_slave_threads = 10;
# Note that above insert could be handled by one of the slave threads
--echo # Set slave threads to 10 step 2
---let $wait_condition = SELECT VARIABLE_VALUE >= 9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
---let $wait_condition_on_error_output = SELECT COUNT(*), 9 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
+SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+
SET GLOBAL wsrep_slave_threads = 20;
--echo # Set slave threads to 20
@@ -38,6 +49,8 @@ SET GLOBAL wsrep_slave_threads = 20;
--let $wait_condition_on_error_output = SELECT COUNT(*), 20 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
--source include/wait_condition_with_debug.inc
+SELECT VARIABLE_VALUE AS EXPECT_20 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
@@ -51,30 +64,57 @@ INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
-
---connection node_1
-SET GLOBAL wsrep_slave_threads = 10;
-SELECT COUNT(*) FROM t1;
---echo # Set slave threads to 10 step 3
---let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
---let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
---source include/wait_condition_with_debug.inc
-
---connection node_2
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
-INSERT INTO t1 VALUES (15);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
+
+--connection node_1
+--echo # Wait until 19 of the appliers has exited
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 1 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
+
+SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+
+SELECT COUNT(*) FROM t1;
+
+SET GLOBAL wsrep_slave_threads = 10;
+--echo # Set slave threads to 10 step 3
+--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
+
+SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+
+--connection node_1
+SET GLOBAL wsrep_slave_threads = 1;
+
+--connection node_2
INSERT INTO t1 VALUES (21);
INSERT INTO t1 VALUES (22);
+INSERT INTO t1 VALUES (23);
+INSERT INTO t1 VALUES (24);
+INSERT INTO t1 VALUES (25);
+INSERT INTO t1 VALUES (26);
+INSERT INTO t1 VALUES (27);
+INSERT INTO t1 VALUES (28);
+INSERT INTO t1 VALUES (29);
+INSERT INTO t1 VALUES (30);
--connection node_1
+--echo # Wait until slave threads back to 1
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+--let $wait_condition_on_error_output = SELECT COUNT(*), 1 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist
+--source include/wait_condition_with_debug.inc
+
+SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count';
+
SELECT COUNT(*) FROM t1;
-SET GLOBAL wsrep_slave_threads = 1;
+
DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
index 837f72129ca..ffc821b6ecc 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result
@@ -208,7 +208,8 @@ DROP TABLE t1, t2;
# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf
# on table with virtual columns and indexes
#
-SET @saved_dbug= @@GLOBAL.debug_dbug;
+InnoDB 0 transactions not purged
+set @saved_dbug= @@global.debug_dbug;
set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
create table t1 (
pk serial, vb tinyblob as (b) virtual, b tinyblob,
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
index ca9d016fdcc..a384e0667de 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test
@@ -264,8 +264,9 @@ DROP TABLE t1, t2;
--echo # on table with virtual columns and indexes
--echo #
+--source suite/innodb/include/wait_all_purged.inc
--let $datadir= `select @@datadir`
-SET @saved_dbug= @@GLOBAL.debug_dbug;
+set @saved_dbug= @@global.debug_dbug;
set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2";
create table t1 (
@@ -373,4 +374,4 @@ SELECT * FROM t1;
# Cleanup
DROP TABLE t1;
SET debug_sync= reset;
-set global debug_dbug= @saved_dbug; \ No newline at end of file
+set global debug_dbug= @saved_dbug;
diff --git a/mysql-test/suite/innodb/r/innodb-blob.result b/mysql-test/suite/innodb/r/innodb-blob.result
index 70a3fcb5511..fdfbfe3e683 100644
--- a/mysql-test/suite/innodb/r/innodb-blob.result
+++ b/mysql-test/suite/innodb/r/innodb-blob.result
@@ -156,3 +156,9 @@ a
SELECT * FROM t2;
a
DROP TABLE t1,t2,t3;
+CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT)ENGINE=InnoDB
+ROW_FORMAT=REDUNDANT;
+SET @fill_amount = (@@innodb_page_size / 2 ) + 1 ;
+INSERT INTO t1 VALUES(1, REPEAT(2, @fill_amount));
+UPDATE t1 SET f1 = 2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/t/innodb-blob.test b/mysql-test/suite/innodb/t/innodb-blob.test
index fbf0641880b..301966fb41d 100644
--- a/mysql-test/suite/innodb/t/innodb-blob.test
+++ b/mysql-test/suite/innodb/t/innodb-blob.test
@@ -206,3 +206,10 @@ SELECT a FROM t3;
SELECT * FROM t2;
DROP TABLE t1,t2,t3;
+
+CREATE TABLE t1(f1 INT PRIMARY KEY, f2 TEXT)ENGINE=InnoDB
+ ROW_FORMAT=REDUNDANT;
+SET @fill_amount = (@@innodb_page_size / 2 ) + 1 ;
+INSERT INTO t1 VALUES(1, REPEAT(2, @fill_amount));
+UPDATE t1 SET f1 = 2;
+DROP TABLE t1;
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug.result b/mysql-test/suite/innodb_fts/r/misc_debug.result
index 3a156049fe2..f1110797f33 100644
--- a/mysql-test/suite/innodb_fts/r/misc_debug.result
+++ b/mysql-test/suite/innodb_fts/r/misc_debug.result
@@ -17,3 +17,12 @@ ALTER TABLE t ADD FULLTEXT INDEX (b(64));
ERROR HY000: Unknown error
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t;
+CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
+FULLTEXT KEY(a)) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT, FOREIGN KEY(b) REFERENCES t1(pk)) ENGINE=InnoDB;
+DROP TABLE t1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+SET DEBUG_DBUG="+d,fts_instrument_sync";
+INSERT INTO t1 VALUES(1, "mariadb");
+ALTER TABLE t1 FORCE;
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/innodb_fts/r/misc_debug2.result b/mysql-test/suite/innodb_fts/r/misc_debug2.result
new file mode 100644
index 00000000000..2c8281579b9
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/misc_debug2.result
@@ -0,0 +1,7 @@
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded");
+CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
+set debug_dbug="+d,fts_instrument_sync_request";
+INSERT INTO mdev21563 VALUES('This is a test');
+ALTER TABLE mdev21563 DISCARD TABLESPACE;
+# restart
+DROP TABLE mdev21563;
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug.test b/mysql-test/suite/innodb_fts/t/misc_debug.test
index 4b32afb848c..aaf628abe6d 100644
--- a/mysql-test/suite/innodb_fts/t/misc_debug.test
+++ b/mysql-test/suite/innodb_fts/t/misc_debug.test
@@ -39,3 +39,16 @@ ALTER TABLE t ADD FULLTEXT INDEX (b(64));
SET SESSION debug_dbug=@saved_debug_dbug;
DROP TABLE t;
+
+# MDEV-21550 Assertion `!table->fts->in_queue' failed in
+# fts_optimize_remove_table
+CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
+ FULLTEXT KEY(a)) ENGINE=InnoDB;
+CREATE TABLE t2 (b INT, FOREIGN KEY(b) REFERENCES t1(pk)) ENGINE=InnoDB;
+--error ER_ROW_IS_REFERENCED_2
+DROP TABLE t1;
+SET DEBUG_DBUG="+d,fts_instrument_sync";
+INSERT INTO t1 VALUES(1, "mariadb");
+ALTER TABLE t1 FORCE;
+# Cleanup
+DROP TABLE t2, t1;
diff --git a/mysql-test/suite/innodb_fts/t/misc_debug2.test b/mysql-test/suite/innodb_fts/t/misc_debug2.test
new file mode 100644
index 00000000000..5b0184e5cca
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/t/misc_debug2.test
@@ -0,0 +1,11 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/not_embedded.inc
+call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded");
+
+CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
+set debug_dbug="+d,fts_instrument_sync_request";
+INSERT INTO mdev21563 VALUES('This is a test');
+ALTER TABLE mdev21563 DISCARD TABLESPACE;
+--source include/restart_mysqld.inc
+DROP TABLE mdev21563;
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 a7008b318ba..6769d867167 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.1
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'
drop user test1@localhost;
create user test1@localhost identified via ed25519 using 'foo';
ERROR HY000: Password hash should be 43 characters long
@@ -46,21 +46,21 @@ ERROR HY000: Password hash should be base64 encoded
create user test1@localhost identified via ed25519 using password('foo');
show grants for test1@localhost;
Grants for test1@localhost
-GRANT USAGE ON *.* TO 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI'
+GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI'
select ed25519_password('foo');
ed25519_password('foo')
vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI
set password for test1@localhost = password('bar');
show create user test1@localhost;
CREATE USER for test1@localhost
-CREATE USER 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10'
+CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10'
select ed25519_password('bar');
ed25519_password('bar')
pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10
set password for test1@localhost = 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY';
show create user test1@localhost;
CREATE USER for test1@localhost
-CREATE USER 'test1'@'localhost' IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
+CREATE USER `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/plugins/r/multiauth.result b/mysql-test/suite/plugins/r/multiauth.result
index 56c33755b02..4b9a603867c 100644
--- a/mysql-test/suite/plugins/r/multiauth.result
+++ b/mysql-test/suite/plugins/r/multiauth.result
@@ -3,7 +3,7 @@ create user USER identified via unix_socket OR mysql_native_password as
create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good");
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA unix_socket OR mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E'
# name match = ok
select user(), current_user(), database();
user() current_user() database()
@@ -19,7 +19,7 @@ create user USER identified via mysql_native_password as password("GOOD"
create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR unix_socket
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR unix_socket
# name match = ok
select user(), current_user(), database();
user() current_user() database()
@@ -35,7 +35,7 @@ create user USER identified via unix_socket OR ed25519 as password("GOOD
create user mysqltest1 identified via unix_socket OR ed25519 as password("good");
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA unix_socket OR ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
# name match = ok
select user(), current_user(), database();
user() current_user() database()
@@ -51,7 +51,7 @@ create user USER identified via ed25519 as password("GOOD") OR unix_sock
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket;
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket
# name match = ok
select user(), current_user(), database();
user() current_user() database()
@@ -67,7 +67,7 @@ create user USER identified via ed25519 as password("GOOD") OR unix_sock
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
# name match = ok
select user(), current_user(), database();
user() current_user() database()
@@ -86,7 +86,7 @@ drop user USER, mysqltest1;
create user mysqltest1 identified via mysql_native_password as password("good") OR mysql_native_password as password("works");
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
# password good = ok
select user(), current_user(), database();
user() current_user() database()
@@ -101,7 +101,7 @@ drop user mysqltest1;
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
show grants for mysqltest1;
Grants for mysqltest1@%
-GRANT USAGE ON *.* TO 'mysqltest1'@'%' IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+GRANT USAGE ON *.* TO `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
select json_detailed(priv) from mysql.global_priv where user='mysqltest1';
json_detailed(priv)
{
@@ -131,26 +131,26 @@ Password plugin authentication_string
flush privileges;
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
set password for mysqltest1 = password('foobar');
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA ed25519 USING 'qv2mG6HWCuy32Slb5xhV4THStewNz2VINVPbgk+XAJ8' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'qv2mG6HWCuy32Slb5xhV4THStewNz2VINVPbgk+XAJ8' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
alter user mysqltest1 identified via unix_socket OR mysql_native_password as password("some");
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA unix_socket OR mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971'
set password for mysqltest1 = password('foobar');
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA unix_socket OR mysql_native_password USING '*9B500343BC52E2911172EB52AE5CF4847604C6E5'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*9B500343BC52E2911172EB52AE5CF4847604C6E5'
alter user mysqltest1 identified via unix_socket;
set password for mysqltest1 = password('bla');
ERROR HY000: SET PASSWORD is ignored for users authenticating via unix_socket plugin
alter user mysqltest1 identified via mysql_native_password as password("some") or unix_socket;
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971' OR unix_socket
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971' OR unix_socket
drop user mysqltest1;
create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
ERROR HY000: Column count of mysql.user is wrong. Expected 3, found 47. Created with MariaDB XX.YY.ZZ, now running XX.YY.ZZ. Please use mysql_upgrade to fix this error
@@ -160,7 +160,7 @@ update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901
flush privileges;
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA mysql_native_password USING 'invalid password' OR unix_socket
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING 'invalid password' OR unix_socket
# name match = ok
select user(), current_user(), database();
user() current_user() database()
@@ -176,13 +176,13 @@ drop user USER, mysqltest1;
create user mysqltest1 identified via ed25519 as password("good");
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
# no plugin = failure
mysqltest: Could not open connection 'default': 1045 Plugin client_ed25519 could not be loaded: <PLUGINDIR>/no/client_ed25519.so: cannot open shared object file: No such file or directory
alter user mysqltest1 identified via ed25519 as password("good") OR mysql_native_password as password("works");
show create user mysqltest1;
CREATE USER for mysqltest1@%
-CREATE USER 'mysqltest1'@'%' IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
# no plugin = failure
mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
# no plugin, second password works = ok
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 21aecdb9bc0..90bf1506b37 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 d880b1fed60..85aeca368e7 100644
--- a/mysql-test/suite/roles/flush_roles-17898.result
+++ b/mysql-test/suite/roles/flush_roles-17898.result
@@ -20,15 +20,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 681c0857edb..80de2d3414e 100644
--- a/mysql-test/suite/roles/grant_revoke_current.result
+++ b/mysql-test/suite/roles/grant_revoke_current.result
@@ -15,30 +15,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='';
drop role r1;
update mysql.global_priv set priv=@root_priv;
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 758dca735e1..10387936c83 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 baec3c5f2a1..2f27db1525a 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 70628059f65..6441dfc2aa4 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 706ba3fba7b..dff41917879 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,17 +39,17 @@ 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'
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 77c317c6a02..5af0cc12be2 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 8590d33e16d..dbf0db863c6 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 2c8c21d97c3..80c5d9a8e39 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 0b37b1a3fc8..207e9a71bd9 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 b86bf3045f3..74771991b0d 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 dec5a0b4436..d54528f23d7 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 57c6ce01c9f..92fc53a15cc 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 3ecc66ba7f0..1fca819b2d5 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 31df0113b8e..57149e401ce 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 7b090c982f0..9438939b024 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 5fa1002f9ac..e4b08800287 100644
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result
@@ -7,8 +7,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;
@@ -41,55 +41,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;
@@ -129,9 +129,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
@@ -223,11 +223,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;
@@ -235,11 +235,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;
@@ -253,10 +253,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;
@@ -265,10 +265,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 511eff51d22..e4113b74e55 100644
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result
@@ -39,54 +39,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 ****
@@ -97,27 +97,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/sys_vars/r/host_cache_size_auto.result b/mysql-test/suite/sys_vars/r/host_cache_size_auto.result
index a0a849c1d7a..a9a683e017b 100644
--- a/mysql-test/suite/sys_vars/r/host_cache_size_auto.result
+++ b/mysql-test/suite/sys_vars/r/host_cache_size_auto.result
@@ -1,3 +1,3 @@
select @@global.host_cache_size;
@@global.host_cache_size
-632
+653
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;
diff --git a/mysql-test/suite/versioning/r/update.result b/mysql-test/suite/versioning/r/update.result
index e7c617f9196..a2ec02a7ec1 100644
--- a/mysql-test/suite/versioning/r/update.result
+++ b/mysql-test/suite/versioning/r/update.result
@@ -249,6 +249,8 @@ replace t1 values (1,2),(1,3),(2,4);
#
# MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE
#
+set @old_lock_wait_timeout= @@innodb_lock_wait_timeout;
+set @@innodb_lock_wait_timeout= 1073741824;
create or replace table t1 (pk int, a char(3), b char(3), primary key(pk))
engine=innodb with system versioning;
insert into t1 (pk) values (1);
@@ -265,6 +267,7 @@ ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
disconnect con1;
connection default;
drop table t1;
+set @@innodb_lock_wait_timeout= @old_lock_wait_timeout;
#
# MDEV-19406 Assertion on updating view of join with versioned table
#
diff --git a/mysql-test/suite/versioning/t/update.test b/mysql-test/suite/versioning/t/update.test
index 548505bd39a..71e946e6c2b 100644
--- a/mysql-test/suite/versioning/t/update.test
+++ b/mysql-test/suite/versioning/t/update.test
@@ -157,6 +157,8 @@ replace t1 values (1,2),(1,3),(2,4);
--echo #
--echo # MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE
--echo #
+set @old_lock_wait_timeout= @@innodb_lock_wait_timeout;
+set @@innodb_lock_wait_timeout= 1073741824;
create or replace table t1 (pk int, a char(3), b char(3), primary key(pk))
engine=innodb with system versioning;
@@ -175,6 +177,7 @@ disconnect con1;
connection default;
reap;
drop table t1;
+set @@innodb_lock_wait_timeout= @old_lock_wait_timeout;
--echo #
--echo # MDEV-19406 Assertion on updating view of join with versioned table
diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh
index c56cdea470c..2a601559e9c 100644
--- a/scripts/mysqlhotcopy.sh
+++ b/scripts/mysqlhotcopy.sh
@@ -296,7 +296,7 @@ foreach my $rdb ( @db_desc ) {
if ($db =~ m/^mysql$/i)
{
@dbh_base_tables = grep
- { !/^(apply_status|schema|general_log|slow_log)$/ } @dbh_base_tables
+ { !/^(apply_status|schema|general_log|slow_log|transaction_registry)$/ } @dbh_base_tables
}
## generate regex for tables/files
diff --git a/sql/derror.cc b/sql/derror.cc
index 14b60ee4db4..7a79833c26c 100644
--- a/sql/derror.cc
+++ b/sql/derror.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
- Copyright (C) 2011 Monty Program Ab
+ Copyright (C) 2011, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -84,8 +84,10 @@ bool init_errmessage(void)
if (!use_english)
{
/* Read messages from file. */
- use_english= !read_texts(ERRMSG_FILE,lang, &original_error_messages);
- error= TRUE;
+ use_english= read_texts(ERRMSG_FILE,lang, &original_error_messages);
+ error= use_english != FALSE;
+ if (error)
+ sql_print_error("Could not load error messages for %s",lang);
}
if (use_english)
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index f6a6dfda6e3..bcd419562b1 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -6268,7 +6268,7 @@ static range_seq_t partition_multi_range_key_init(void *init_params,
ha_partition *partition= hld->partition;
uint i= hld->part_id;
DBUG_ENTER("partition_multi_range_key_init");
- partition->m_mrr_range_init_flags= flags;
+ // not used: partition->m_mrr_range_init_flags= flags;
hld->partition_part_key_multi_range= partition->m_part_mrr_range_first[i];
DBUG_RETURN(init_params);
}
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index 17a41b0728a..5b8718cd3ae 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -184,17 +184,61 @@ private:
bool is_subpart);
};
+
+/*
+ List of ranges to be scanned by ha_partition's MRR implementation
+
+ This object is
+ - A KEY_MULTI_RANGE structure (the MRR range)
+ - Storage for the range endpoints that the KEY_MULTI_RANGE has pointers to
+ - list of such ranges (connected through the "next" pointer).
+*/
+
typedef struct st_partition_key_multi_range
{
+ /*
+ Number of the range. The ranges are numbered in the order RANGE_SEQ_IF has
+ emitted them, starting from 1. The numbering in used by ordered MRR scans.
+ */
uint id;
uchar *key[2];
+ /*
+ Sizes of allocated memory in key[]. These may be larger then the actual
+ values as this structure is reused across MRR scans
+ */
uint length[2];
+
+ /*
+ The range.
+ key_multi_range.ptr is a pointer to the this PARTITION_KEY_MULTI_RANGE
+ object
+ */
KEY_MULTI_RANGE key_multi_range;
+
+ // Range id from the SQL layer
range_id_t ptr;
+
+ // The next element in the list of MRR ranges.
st_partition_key_multi_range *next;
} PARTITION_KEY_MULTI_RANGE;
+/*
+ List of ranges to be scanned in a certain [sub]partition.
+
+ The idea is that there's a list of ranges to be scanned in the table
+ (formed by PARTITION_KEY_MULTI_RANGE structures),
+ and for each [sub]partition, we only need to scan a subset of that list.
+
+ PKMR1 --> PKMR2 --> PKMR3 -->... // list of PARTITION_KEY_MULTI_RANGE
+ ^ ^
+ | |
+ PPKMR1 ----------> PPKMR2 -->... // list of PARTITION_PART_KEY_MULTI_RANGE
+
+ This way, per-partition lists of PARTITION_PART_KEY_MULTI_RANGE have pointers
+ to the elements of the global list of PARTITION_KEY_MULTI_RANGE.
+*/
+
typedef struct st_partition_part_key_multi_range
{
PARTITION_KEY_MULTI_RANGE *partition_key_multi_range;
@@ -203,10 +247,23 @@ typedef struct st_partition_part_key_multi_range
class ha_partition;
+
+/*
+ The structure holding information about range sequence to be used with one
+ partition.
+ (pointer to this is used as seq_init_param for RANGE_SEQ_IF structure when
+ invoking MRR for an individual partition)
+*/
+
typedef struct st_partition_part_key_multi_range_hld
{
+ /* Owner object */
ha_partition *partition;
+
+ // id of the the partition this structure is for
uint32 part_id;
+
+ // Current range we're iterating through.
PARTITION_PART_KEY_MULTI_RANGE *partition_part_key_multi_range;
} PARTITION_PART_KEY_MULTI_RANGE_HLD;
@@ -813,21 +870,51 @@ public:
uint m_mrr_new_full_buffer_size;
MY_BITMAP m_mrr_used_partitions;
uint *m_stock_range_seq;
- uint m_current_range_seq;
+ // not used: uint m_current_range_seq;
+
+ // Value of mrr_mode passed to ha_partition::multi_range_read_init
uint m_mrr_mode;
+
+ // Value of n_ranges passed to ha_partition::multi_range_read_init
uint m_mrr_n_ranges;
+
+ /*
+ Ordered MRR mode: m_range_info[N] has the range_id of the last record that
+ we've got from partition N.
+ */
range_id_t *m_range_info;
+
+ // TRUE <=> This ha_partition::multi_range_read_next() call is the first one
bool m_multi_range_read_first;
- uint m_mrr_range_init_flags;
+ // not used: uint m_mrr_range_init_flags;
+
+ /* Number of elements in the list pointed by m_mrr_range_first. Not used */
uint m_mrr_range_length;
+
+ // Linked list of ranges to scan
PARTITION_KEY_MULTI_RANGE *m_mrr_range_first;
PARTITION_KEY_MULTI_RANGE *m_mrr_range_current;
+
+ /*
+ For each partition: number of ranges MRR scan will scan in the partition
+ */
uint *m_part_mrr_range_length;
+
+ /*
+ For each partition: List of ranges to scan in this partition.
+ */
PARTITION_PART_KEY_MULTI_RANGE **m_part_mrr_range_first;
PARTITION_PART_KEY_MULTI_RANGE **m_part_mrr_range_current;
PARTITION_PART_KEY_MULTI_RANGE_HLD *m_partition_part_key_multi_range_hld;
+
+ /*
+ Sequence of ranges to be scanned (TODO: why not stores this in
+ handler::mrr_{iter,funcs}?)
+ */
range_seq_t m_seq;
RANGE_SEQ_IF *m_seq_if;
+
+ // Range iterator structure to be supplied to partitions
RANGE_SEQ_IF m_part_seq_if;
virtual int multi_range_key_create_key(
diff --git a/sql/log.cc b/sql/log.cc
index af22c4993bb..ffeb3661783 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
- Copyright (c) 2009, 2019, MariaDB Corporation
+ Copyright (c) 2009, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3318,7 +3318,7 @@ void MYSQL_BIN_LOG::cleanup()
DBUG_ASSERT(!binlog_xid_count_list.head());
WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::cleanup(): Removing xid_list_entry "
"for %s (%lu)", b);
- my_free(b);
+ delete b;
}
mysql_mutex_destroy(&LOCK_log);
@@ -3683,19 +3683,10 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
know from where to start recovery.
*/
size_t off= dirname_length(log_file_name);
- size_t len= strlen(log_file_name) - off;
- char *entry_mem, *name_mem;
- if (!(new_xid_list_entry = (xid_count_per_binlog *)
- my_multi_malloc(MYF(MY_WME),
- &entry_mem, sizeof(xid_count_per_binlog),
- &name_mem, len,
- NULL)))
+ uint len= static_cast<uint>(strlen(log_file_name) - off);
+ new_xid_list_entry= new xid_count_per_binlog(log_file_name+off, len);
+ if (!new_xid_list_entry)
goto err;
- memcpy(name_mem, log_file_name+off, len);
- new_xid_list_entry->binlog_name= name_mem;
- new_xid_list_entry->binlog_name_len= (int)len;
- new_xid_list_entry->xid_count= 0;
- new_xid_list_entry->notify_count= 0;
/*
Find the name for the Initial binlog checkpoint.
@@ -3712,8 +3703,11 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
mysql_mutex_unlock(&LOCK_xid_list);
if (!b)
b= new_xid_list_entry;
- strmake(buf, b->binlog_name, b->binlog_name_len);
- Binlog_checkpoint_log_event ev(buf, (uint)len);
+ if (b->binlog_name)
+ strmake(buf, b->binlog_name, b->binlog_name_len);
+ else
+ goto err;
+ Binlog_checkpoint_log_event ev(buf, len);
DBUG_EXECUTE_IF("crash_before_write_checkpoint_event",
flush_io_cache(&log_file);
mysql_file_sync(log_file.file, MYF(MY_WME));
@@ -3816,7 +3810,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
{
WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Removing xid_list_entry for "
"%s (%lu)", b);
- my_free(binlog_xid_count_list.get());
+ delete binlog_xid_count_list.get();
}
mysql_cond_broadcast(&COND_xid_list);
WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Adding new xid_list_entry for "
@@ -3866,7 +3860,7 @@ err:
#endif
sql_print_error(fatal_log_error, name, tmp_errno);
if (new_xid_list_entry)
- my_free(new_xid_list_entry);
+ delete new_xid_list_entry;
if (file >= 0)
mysql_file_close(file, MYF(0));
close(LOG_CLOSE_INDEX);
@@ -4354,7 +4348,7 @@ err:
DBUG_ASSERT(b->xid_count == 0);
WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::reset_logs(): Removing "
"xid_list_entry for %s (%lu)", b);
- my_free(binlog_xid_count_list.get());
+ delete binlog_xid_count_list.get();
}
mysql_cond_broadcast(&COND_xid_list);
reset_master_pending--;
@@ -9900,7 +9894,7 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint)
break;
WSREP_XID_LIST_ENTRY("TC_LOG_BINLOG::mark_xid_done(): Removing "
"xid_list_entry for %s (%lu)", b);
- my_free(binlog_xid_count_list.get());
+ delete binlog_xid_count_list.get();
}
mysql_mutex_unlock(&LOCK_xid_list);
diff --git a/sql/log.h b/sql/log.h
index 52bab149381..eef81c46ac4 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2005, 2016, Oracle and/or its affiliates.
- Copyright (c) 2009, 2017, MariaDB Corporation.
+ Copyright (c) 2009, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -593,7 +593,18 @@ public:
long notify_count;
/* For linking in requests to the binlog background thread. */
xid_count_per_binlog *next_in_queue;
- xid_count_per_binlog(); /* Give link error if constructor used. */
+ xid_count_per_binlog(char *log_file_name, uint log_file_name_len)
+ :binlog_id(0), xid_count(0), notify_count(0)
+ {
+ binlog_name_len= log_file_name_len;
+ binlog_name= (char *) my_malloc(binlog_name_len, MYF(MY_ZEROFILL));
+ if (binlog_name)
+ memcpy(binlog_name, log_file_name, binlog_name_len);
+ }
+ ~xid_count_per_binlog()
+ {
+ my_free(binlog_name);
+ }
};
I_List<xid_count_per_binlog> binlog_xid_count_list;
mysql_mutex_t LOCK_binlog_background_thread;
diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc
index b974026bb65..edf3e82de40 100644
--- a/sql/my_decimal.cc
+++ b/sql/my_decimal.cc
@@ -345,12 +345,12 @@ void my_decimal_trim(ulonglong *precision, uint *scale)
*/
int my_decimal2int(uint mask, const decimal_t *d, bool unsigned_flag,
- longlong *l)
+ longlong *l, decimal_round_mode round_type)
{
int res;
my_decimal rounded;
/* decimal_round can return only E_DEC_TRUNCATED */
- decimal_round(d, &rounded, 0, HALF_UP);
+ decimal_round(d, &rounded, 0, round_type);
res= (unsigned_flag ?
decimal2ulonglong(&rounded, (ulonglong *) l) :
decimal2longlong(&rounded, l));
diff --git a/sql/my_decimal.h b/sql/my_decimal.h
index 9910f436e05..a7f6fc9e88d 100644
--- a/sql/my_decimal.h
+++ b/sql/my_decimal.h
@@ -373,7 +373,7 @@ my_decimal *seconds2my_decimal(bool sign, ulonglong sec, ulong microsec,
(TIME)->second_part, (DECIMAL))
int my_decimal2int(uint mask, const decimal_t *d, bool unsigned_flag,
- longlong *l);
+ longlong *l, decimal_round_mode round_type= HALF_UP);
inline
int my_decimal2double(uint, const decimal_t *d, double *result)
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 96f4dd1095b..439437d6541 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4192,7 +4192,7 @@ static int init_common_variables()
min_connections= 10;
/* MyISAM requires two file handles per table. */
wanted_files= (extra_files + max_connections + extra_max_connections +
- tc_size * 2);
+ tc_size * 2 * tc_instances);
#if defined(HAVE_POOL_OF_THREADS) && !defined(__WIN__)
// add epoll or kevent fd for each threadpool group, in case pool of threads is used
wanted_files+= (thread_handling > SCHEDULER_NO_THREADS) ? 0 : threadpool_size;
@@ -4221,6 +4221,14 @@ static int init_common_variables()
if (files < wanted_files && global_system_variables.log_warnings)
sql_print_warning("Could not increase number of max_open_files to more than %u (request: %u)", files, wanted_files);
+ /* If we required too much tc_instances than we reduce */
+ SYSVAR_AUTOSIZE_IF_CHANGED(tc_instances,
+ (uint32) MY_MIN(MY_MAX((files - extra_files -
+ max_connections)/
+ 2/tc_size,
+ 1),
+ tc_instances),
+ uint32);
/*
If we have requested too much file handles than we bring
max_connections in supported bounds. Still leave at least
@@ -4228,7 +4236,7 @@ static int init_common_variables()
*/
SYSVAR_AUTOSIZE_IF_CHANGED(max_connections,
(ulong) MY_MAX(MY_MIN(files- extra_files-
- min_tc_size*2,
+ min_tc_size*2*tc_instances,
max_connections),
min_connections),
ulong);
@@ -4241,7 +4249,7 @@ static int init_common_variables()
*/
SYSVAR_AUTOSIZE_IF_CHANGED(tc_size,
(ulong) MY_MIN(MY_MAX((files - extra_files -
- max_connections) / 2,
+ max_connections) / 2 / tc_instances,
min_tc_size),
tc_size), ulong);
DBUG_PRINT("warning",
diff --git a/sql/opt_split.cc b/sql/opt_split.cc
index cfac0c93544..6f8248c315c 100644
--- a/sql/opt_split.cc
+++ b/sql/opt_split.cc
@@ -307,7 +307,7 @@ struct SplM_field_ext_info: public SplM_field_info
8. P contains some references on the columns of the joined tables C
occurred also in the select list of this join
9. There are defined some keys usable for ref access of fields from C
- with available statistics.
+ with available statistics.
@retval
true if the answer is positive
@@ -477,6 +477,15 @@ bool JOIN::check_for_splittable_materialized()
/* Attach this info to the table T */
derived->table->set_spl_opt_info(spl_opt_info);
+ /*
+ If this is specification of a materialized derived table T that is
+ potentially splittable and is used in the from list of the right operand
+ of an IN predicand transformed to a semi-join then the embedding semi-join
+ nest is not allowed to be materialized.
+ */
+ if (derived && derived->is_materialized_derived() &&
+ derived->embedding && derived->embedding->sj_subq_pred)
+ derived->embedding->sj_subq_pred->types_allow_materialization= FALSE;
return true;
}
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index b986c854391..457120d518b 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -8688,13 +8688,12 @@ static void add_user_option(String *grant, double value, const char *name)
}
}
-static void add_user_parameters(String *result, ACL_USER* acl_user,
+static void add_user_parameters(THD *thd, String *result, ACL_USER* acl_user,
bool with_grant)
{
- result->append(STRING_WITH_LEN("@'"));
- result->append(acl_user->host.hostname, acl_user->hostname_length,
- system_charset_info);
- result->append('\'');
+ result->append('@');
+ append_identifier(thd, result, acl_user->host.hostname,
+ acl_user->hostname_length);
if (acl_user->nauth == 1 &&
(acl_user->auth->plugin.str == native_password_plugin_name.str ||
@@ -8885,11 +8884,9 @@ bool mysql_show_create_user(THD *thd, LEX_USER *lex_user)
goto end;
}
- result.append("CREATE USER '");
- result.append(username);
- result.append('\'');
-
- add_user_parameters(&result, acl_user, false);
+ result.append("CREATE USER ");
+ append_identifier(thd, &result, username, strlen(username));
+ add_user_parameters(thd, &result, acl_user, false);
if (acl_user->password_expired)
result.append(STRING_WITH_LEN(" PASSWORD EXPIRE"));
@@ -9148,17 +9145,14 @@ static bool show_role_grants(THD *thd, const char *username,
grant.append(STRING_WITH_LEN("GRANT "));
ACL_ROLE *acl_role= *(dynamic_element(&acl_entry->role_grants, counter,
ACL_ROLE**));
- grant.append(acl_role->user.str, acl_role->user.length,
- system_charset_info);
- grant.append(STRING_WITH_LEN(" TO '"));
- grant.append(acl_entry->user.str, acl_entry->user.length,
- system_charset_info);
+ append_identifier(thd, &grant, acl_role->user.str, acl_role->user.length);
+ grant.append(STRING_WITH_LEN(" TO "));
+ append_identifier(thd, &grant, acl_entry->user.str, acl_entry->user.length);
if (!(acl_entry->flags & IS_ROLE))
{
- grant.append(STRING_WITH_LEN("'@'"));
- grant.append(&host);
+ grant.append('@');
+ append_identifier(thd, &grant, host.str, host.length);
}
- grant.append('\'');
ROLE_GRANT_PAIR *pair=
find_role_grant_pair(&acl_entry->user, &host, &acl_role->user);
@@ -9212,13 +9206,12 @@ static bool show_global_privileges(THD *thd, ACL_USER_BASE *acl_entry,
}
}
}
- global.append (STRING_WITH_LEN(" ON *.* TO '"));
- global.append(acl_entry->user.str, acl_entry->user.length,
- system_charset_info);
- global.append('\'');
+ global.append (STRING_WITH_LEN(" ON *.* TO "));
+ append_identifier(thd, &global, acl_entry->user.str, acl_entry->user.length);
if (!handle_as_role)
- add_user_parameters(&global, (ACL_USER *)acl_entry, (want_access & GRANT_ACL));
+ add_user_parameters(thd, &global, (ACL_USER *)acl_entry,
+ (want_access & GRANT_ACL));
protocol->prepare_for_resend();
protocol->store(global.ptr(),global.length(),global.charset());
@@ -9229,6 +9222,21 @@ static bool show_global_privileges(THD *thd, ACL_USER_BASE *acl_entry,
}
+
+static void add_to_user(THD *thd, String *result, const char *user,
+ bool is_user, const char *host)
+{
+ result->append(STRING_WITH_LEN(" TO "));
+ append_identifier(thd, result, user, strlen(user));
+ if (is_user)
+ {
+ result->append('@');
+ // host and lex_user->host are equal except for case
+ append_identifier(thd, result, host, strlen(host));
+ }
+}
+
+
static bool show_database_privileges(THD *thd, const char *username,
const char *hostname,
char *buff, size_t buffsize)
@@ -9289,16 +9297,8 @@ static bool show_database_privileges(THD *thd, const char *username,
}
db.append (STRING_WITH_LEN(" ON "));
append_identifier(thd, &db, acl_db->db, strlen(acl_db->db));
- db.append (STRING_WITH_LEN(".* TO '"));
- db.append(username, strlen(username),
- system_charset_info);
- if (*hostname)
- {
- db.append (STRING_WITH_LEN("'@'"));
- // host and lex_user->host are equal except for case
- db.append(host, strlen(host), system_charset_info);
- }
- db.append ('\'');
+ db.append (STRING_WITH_LEN(".*"));
+ add_to_user(thd, &db, username, (*hostname), host);
if (want_access & GRANT_ACL)
db.append(STRING_WITH_LEN(" WITH GRANT OPTION"));
protocol->prepare_for_resend();
@@ -9429,16 +9429,7 @@ static bool show_table_and_column_privileges(THD *thd, const char *username,
global.append('.');
append_identifier(thd, &global, grant_table->tname,
strlen(grant_table->tname));
- global.append(STRING_WITH_LEN(" TO '"));
- global.append(username, strlen(username),
- system_charset_info);
- if (*hostname)
- {
- global.append(STRING_WITH_LEN("'@'"));
- // host and lex_user->host are equal except for case
- global.append(host, strlen(host), system_charset_info);
- }
- global.append('\'');
+ add_to_user(thd, &global, username, (*hostname), host);
if (table_access & GRANT_ACL)
global.append(STRING_WITH_LEN(" WITH GRANT OPTION"));
protocol->prepare_for_resend();
@@ -9524,16 +9515,7 @@ static int show_routine_grants(THD* thd,
global.append('.');
append_identifier(thd, &global, grant_proc->tname,
strlen(grant_proc->tname));
- global.append(STRING_WITH_LEN(" TO '"));
- global.append(username, strlen(username),
- system_charset_info);
- if (*hostname)
- {
- global.append(STRING_WITH_LEN("'@'"));
- // host and lex_user->host are equal except for case
- global.append(host, strlen(host), system_charset_info);
- }
- global.append('\'');
+ add_to_user(thd, &global, username, (*hostname), host);
if (proc_access & GRANT_ACL)
global.append(STRING_WITH_LEN(" WITH GRANT OPTION"));
protocol->prepare_for_resend();
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2c74f15aa17..9af4afd4b03 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1844,7 +1844,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) &&
! thd->is_error())
{
- thd->get_stmt_da()->set_skip_flush();
/*
Multiple queries exist, execute them individually
*/
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 0c7be11bd59..12198d34c88 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -2836,14 +2836,34 @@ bool partition_key_modified(TABLE *table, const MY_BITMAP *fields)
static inline int part_val_int(Item *item_expr, longlong *result)
{
- *result= item_expr->val_int();
+ switch (item_expr->cmp_type())
+ {
+ case DECIMAL_RESULT:
+ {
+ my_decimal buf;
+ my_decimal *val= item_expr->val_decimal(&buf);
+ if (val && my_decimal2int(E_DEC_FATAL_ERROR, val, item_expr->unsigned_flag,
+ result, FLOOR) != E_DEC_OK)
+ return true;
+ break;
+ }
+ case INT_RESULT:
+ *result= item_expr->val_int();
+ break;
+ case STRING_RESULT:
+ case REAL_RESULT:
+ case ROW_RESULT:
+ case TIME_RESULT:
+ DBUG_ASSERT(0);
+ break;
+ }
if (item_expr->null_value)
{
if (unlikely(current_thd->is_error()))
- return TRUE;
+ return true;
*result= LONGLONG_MIN;
}
- return FALSE;
+ return false;
}
diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic
index e983347f4ce..f33f469b160 100644
--- a/sql/sys_vars.ic
+++ b/sql/sys_vars.ic
@@ -2634,7 +2634,6 @@ public:
if (!Sys_var_enum::do_check(thd, var))
return false;
MYSQL_TIME ltime;
- // FIXME: please resolve both conflicts to "old" and remove this comment
Datetime::Options opt(TIME_CONV_NONE |
TIME_NO_ZERO_IN_DATE |
TIME_NO_ZERO_DATE, thd);
diff --git a/sql/table.cc b/sql/table.cc
index 1d5aaf7e574..6426cb57524 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -4668,7 +4668,6 @@ bool check_column_name(const char *name)
been opened.
@param[in] table The table to check
- @param[in] table_f_count Expected number of columns in the table
@param[in] table_def Expected structure of the table (column name
and type)
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 4c5046ed763..4556411015c 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -2235,8 +2235,8 @@ buf_page_realloc(
ut_d(block->page.in_page_hash = FALSE);
ulint fold = block->page.id.fold();
ut_ad(fold == new_block->page.id.fold());
- HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, (&block->page));
- HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold, (&new_block->page));
+ HASH_REPLACE(buf_page_t, hash, buf_pool->page_hash, fold,
+ &block->page, &new_block->page);
ut_ad(new_block->page.in_page_hash);
@@ -3349,8 +3349,8 @@ buf_relocate(
/* relocate buf_pool->page_hash */
ulint fold = bpage->id.fold();
ut_ad(fold == dpage->id.fold());
- HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, bpage);
- HASH_INSERT(buf_page_t, hash, buf_pool->page_hash, fold, dpage);
+ HASH_REPLACE(buf_page_t, hash, buf_pool->page_hash, fold, bpage,
+ dpage);
}
/** Hazard Pointer implementation. */
diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc
index 79fafa68c4c..f2a475e2046 100644
--- a/storage/innobase/buf/buf0lru.cc
+++ b/storage/innobase/buf/buf0lru.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -59,6 +59,7 @@ static const ulint BUF_LRU_OLD_TOLERANCE = 20;
@see buf_LRU_old_adjust_len */
#define BUF_LRU_NON_OLD_MIN_LEN 5
+#ifdef BTR_CUR_HASH_ADAPT
/** When dropping the search hash index entries before deleting an ibd
file, we build a local array of pages belonging to that tablespace
in the buffer pool. Following is the size of that array.
@@ -67,6 +68,7 @@ flush_list when dropping a table. This is to ensure that other threads
are not blocked for extended period of time when using very large
buffer pools. */
static const ulint BUF_LRU_DROP_SEARCH_SIZE = 1024;
+#endif /* BTR_CUR_HASH_ADAPT */
/** We scan these many blocks when looking for a clean page to evict
during LRU eviction. */
@@ -376,7 +378,6 @@ drop_ahi:
return true;
}
-#endif /* BTR_CUR_HASH_ADAPT */
/******************************************************************//**
While flushing (or removing dirty) pages from a tablespace we don't
@@ -465,6 +466,7 @@ buf_flush_try_yield(
return(false);
}
+#endif /* BTR_CUR_HASH_ADAPT */
/******************************************************************//**
Removes a single page from a given tablespace inside a specific
@@ -640,6 +642,7 @@ rescan:
goto rescan;
}
+#ifdef BTR_CUR_HASH_ADAPT
++processed;
/* Yield if we have hogged the CPU and mutexes for too long. */
@@ -649,6 +652,7 @@ rescan:
processed = 0;
}
+#endif /* BTR_CUR_HASH_ADAPT */
/* The check for trx is interrupted is expensive, we want
to check every N iterations. */
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 3b05814c45a..af6e45e3ad3 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -2,7 +2,7 @@
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -355,7 +355,10 @@ dict_table_close(
mutex_exit(&dict_sys.mutex);
- if (drop_aborted) {
+ /* dict_table_try_drop_aborted() can generate undo logs.
+ So it should be avoided after shutdown of background
+ threads */
+ if (drop_aborted && !srv_undo_sources) {
dict_table_try_drop_aborted(NULL, table_id, 0);
}
}
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 2e5f56b87dc..bd22e78c5b2 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (C) 2013, 2015, Google Inc. All Rights Reserved.
-Copyright (c) 2014, 2019, MariaDB Corporation.
+Copyright (c) 2014, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -753,74 +753,11 @@ fil_space_encrypt(
return (src_frame);
}
- fil_space_crypt_t* crypt_data = space->crypt_data;
- const ulint zip_size = space->zip_size();
ut_ad(space->pending_io());
- const bool full_crc32 = space->full_crc32();
-
- byte* tmp = fil_encrypt_buf(crypt_data, space->id, offset, lsn,
- src_frame, zip_size, dst_frame,
- full_crc32);
-
-#ifdef UNIV_DEBUG
- if (tmp) {
- /* Verify that encrypted buffer is not corrupted */
- dberr_t err = DB_SUCCESS;
- byte* src = src_frame;
- byte tmp_mem[UNIV_PAGE_SIZE_MAX];
-
- if (full_crc32) {
- bool compressed = false, corrupted = false;
- uint size = buf_page_full_crc32_size(
- tmp, &compressed, &corrupted);
- ut_ad(!corrupted);
- ut_ad(!compressed == (size == srv_page_size));
- ut_ad(fil_space_decrypt(space->id, crypt_data, tmp_mem,
- size, space->flags, tmp,
- &err));
- ut_ad(err == DB_SUCCESS);
- memcpy(tmp_mem, src, FIL_PAGE_OFFSET);
- ut_ad(!memcmp(src, tmp_mem,
- (size - FIL_PAGE_FCRC32_CHECKSUM)));
- } else {
- bool page_compressed_encrypted =
- (mach_read_from_2(tmp+FIL_PAGE_TYPE)
- == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
- byte uncomp_mem[UNIV_PAGE_SIZE_MAX];
-
- if (page_compressed_encrypted) {
- memcpy(uncomp_mem, src, srv_page_size);
- ulint unzipped1 = fil_page_decompress(
- tmp_mem, uncomp_mem, space->flags);
- ut_ad(unzipped1);
- if (unzipped1 != srv_page_size) {
- src = uncomp_mem;
- }
- }
-
- ut_ad(!buf_page_is_corrupted(true, src, space->flags));
-
- ut_ad(fil_space_decrypt(space->id, crypt_data, tmp_mem,
- space->physical_size(),
- space->flags, tmp, &err));
- ut_ad(err == DB_SUCCESS);
-
- if (page_compressed_encrypted) {
- memcpy(tmp_mem, uncomp_mem, srv_page_size);
- ulint unzipped2 = fil_page_decompress(
- uncomp_mem, tmp_mem, space->flags);
- ut_ad(unzipped2);
- }
-
- memcpy(tmp_mem + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
- src + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 8);
- ut_ad(!memcmp(src, tmp_mem, space->physical_size()));
- }
- }
-#endif /* UNIV_DEBUG */
-
- return tmp;
+ return fil_encrypt_buf(space->crypt_data, space->id, offset, lsn,
+ src_frame, space->zip_size(),
+ dst_frame, space->full_crc32());
}
/** Decrypt a page for full checksum format.
diff --git a/storage/innobase/fts/fts0opt.cc b/storage/innobase/fts/fts0opt.cc
index d21107b4728..cd44ef7f67e 100644
--- a/storage/innobase/fts/fts0opt.cc
+++ b/storage/innobase/fts/fts0opt.cc
@@ -2645,8 +2645,6 @@ fts_optimize_request_sync_table(
ib_wqueue_add(fts_optimize_wq, msg, msg->heap, true);
- table->fts->in_queue = true;
-
mutex_exit(&fts_optimize_wq->mutex);
}
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 5698346b279..05592fa9584 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2019, MariaDB Corporation.
+Copyright (c) 2014, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -9058,6 +9058,8 @@ i_s_innodb_mutexes_fill_table(
~Locking() { mutex_exit(&rw_lock_list_mutex); }
} locking;
+ char lock_name[sizeof "buf0dump.cc:12345"];
+
for (lock = UT_LIST_GET_FIRST(rw_lock_list); lock != NULL;
lock = UT_LIST_GET_NEXT(list, lock)) {
if (lock->count_os_wait == 0) {
@@ -9070,11 +9072,16 @@ i_s_innodb_mutexes_fill_table(
continue;
}
- //OK(field_store_string(fields[MUTEXES_NAME],
- // lock->lock_name));
- OK(field_store_string(
- fields[MUTEXES_CREATE_FILE],
- innobase_basename(lock->cfile_name)));
+ const char* basename = innobase_basename(
+ lock->cfile_name);
+
+ snprintf(lock_name, sizeof lock_name, "%s:%u",
+ basename, lock->cline);
+
+ OK(field_store_string(fields[MUTEXES_NAME],
+ lock_name));
+ OK(field_store_string(fields[MUTEXES_CREATE_FILE],
+ basename));
OK(fields[MUTEXES_CREATE_LINE]->store(lock->cline,
true));
fields[MUTEXES_CREATE_LINE]->set_notnull();
@@ -9090,8 +9097,8 @@ i_s_innodb_mutexes_fill_table(
snprintf(buf1, sizeof buf1, "combined %s",
innobase_basename(block_lock->cfile_name));
- //OK(field_store_string(fields[MUTEXES_NAME],
- // block_lock->lock_name));
+ OK(field_store_string(fields[MUTEXES_NAME],
+ "buf_block_t::lock"));
OK(field_store_string(fields[MUTEXES_CREATE_FILE],
buf1));
OK(fields[MUTEXES_CREATE_LINE]->store(block_lock->cline,
diff --git a/storage/innobase/include/hash0hash.h b/storage/innobase/include/hash0hash.h
index 5d317a23d4e..4f55b051d80 100644
--- a/storage/innobase/include/hash0hash.h
+++ b/storage/innobase/include/hash0hash.h
@@ -184,6 +184,18 @@ do {\
HASH_INVALIDATE(DATA, NAME);\
} while (0)
+#define HASH_REPLACE(TYPE, NAME, TABLE, FOLD, DATA_OLD, DATA_NEW) \
+ do { \
+ (DATA_NEW)->NAME = (DATA_OLD)->NAME; \
+ \
+ hash_cell_t& cell3333 \
+ = TABLE->array[hash_calc_hash(FOLD, TABLE)]; \
+ TYPE** struct3333 = (TYPE**)&cell3333.node; \
+ while (*struct3333 != DATA_OLD) { \
+ struct3333 = &((*struct3333)->NAME); \
+ } \
+ *struct3333 = DATA_NEW; \
+ } while (0)
/*******************************************************************//**
Gets the first struct in a hash chain, NULL if none. */
diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h
index fa22b3d3086..18ae845955a 100644
--- a/storage/innobase/include/mem0mem.h
+++ b/storage/innobase/include/mem0mem.h
@@ -291,13 +291,6 @@ mem_heap_printf(
const char* format, /*!< in: format string */
...) MY_ATTRIBUTE ((format (printf, 2, 3)));
-/** Checks that an object is a memory heap (or a block of it)
-@param[in] heap Memory heap to check */
-UNIV_INLINE
-void
-mem_block_validate(
- const mem_heap_t* heap);
-
#ifdef UNIV_DEBUG
/** Validates the contents of a memory heap.
Asserts that the memory heap is consistent
@@ -312,7 +305,6 @@ mem_heap_validate(
/** The info structure stored at the beginning of a heap block */
struct mem_block_info_t {
- ulint magic_n;/* magic number for debugging */
#ifdef UNIV_DEBUG
char file_name[8];/* file name where the mem heap was created */
unsigned line; /*!< line number where the mem heap was created */
@@ -347,9 +339,6 @@ struct mem_block_info_t {
otherwise, this is NULL */
};
-#define MEM_BLOCK_MAGIC_N 764741555
-#define MEM_FREED_BLOCK_MAGIC_N 547711122
-
/* Header size for a memory heap block */
#define MEM_BLOCK_HEADER_SIZE UT_CALC_ALIGN(sizeof(mem_block_info_t),\
UNIV_MEM_ALIGNMENT)
diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic
index fae2aaf4d04..2a88c0f1065 100644
--- a/storage/innobase/include/mem0mem.ic
+++ b/storage/innobase/include/mem0mem.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -144,16 +144,6 @@ mem_block_get_start(mem_block_t* block)
return(block->start);
}
-/** Checks that an object is a memory heap block
-@param[in] block Memory block to check. */
-UNIV_INLINE
-void
-mem_block_validate(
- const mem_block_t* block)
-{
- ut_a(block->magic_n == MEM_BLOCK_MAGIC_N);
-}
-
/** Allocates and zero-fills n bytes of memory from a memory heap.
@param[in] heap memory heap
@param[in] n number of bytes; if the heap is allowed to grow into
@@ -186,8 +176,6 @@ mem_heap_alloc(
byte* buf;
ulint free;
- ut_d(mem_block_validate(heap));
-
block = UT_LIST_GET_LAST(heap->base);
n += REDZONE_SIZE;
@@ -230,8 +218,6 @@ mem_heap_get_heap_top(
mem_block_t* block;
byte* buf;
- ut_d(mem_block_validate(heap));
-
block = UT_LIST_GET_LAST(heap->base);
buf = (byte*) block + mem_block_get_free(block);
@@ -322,8 +308,6 @@ mem_heap_get_top(
mem_block_t* block;
byte* buf;
- ut_d(mem_block_validate(heap));
-
block = UT_LIST_GET_LAST(heap->base);
buf = (byte*) block + mem_block_get_free(block) - MEM_SPACE_NEEDED(n);
@@ -343,8 +327,6 @@ mem_heap_free_top(
{
mem_block_t* block;
- ut_d(mem_block_validate(heap));
-
n += REDZONE_SIZE;
block = UT_LIST_GET_LAST(heap->base);
@@ -420,8 +402,6 @@ mem_heap_free(
mem_block_t* block;
mem_block_t* prev_block;
- ut_d(mem_block_validate(heap));
-
block = UT_LIST_GET_LAST(heap->base);
if (heap->free_block) {
@@ -448,11 +428,7 @@ mem_heap_get_size(
/*==============*/
mem_heap_t* heap) /*!< in: heap */
{
- ulint size = 0;
-
- ut_d(mem_block_validate(heap));
-
- size = heap->total_size;
+ ulint size = heap->total_size;
if (heap->free_block) {
size += srv_page_size;
diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic
index c440850cf13..d2f36845e53 100644
--- a/storage/innobase/include/rem0rec.ic
+++ b/storage/innobase/include/rem0rec.ic
@@ -1390,7 +1390,11 @@ rec_get_converted_size(
data_size = dtuple_get_data_size(dtuple, 0);
- ut_ad(n_ext == dtuple_get_n_ext(dtuple));
+ /* If primary key is being updated then the new record inherits
+ externally stored fields from the delete-marked old record.
+ In that case, n_ext may be less value than
+ dtuple_get_n_ext(tuple). */
+ ut_ad(n_ext <= dtuple_get_n_ext(dtuple));
extra_size = rec_get_converted_extra_size(
data_size, dtuple_get_n_fields(dtuple), n_ext);
diff --git a/storage/innobase/mem/mem0mem.cc b/storage/innobase/mem/mem0mem.cc
index a298a7c0b2f..15dee37cc1f 100644
--- a/storage/innobase/mem/mem0mem.cc
+++ b/storage/innobase/mem/mem0mem.cc
@@ -210,8 +210,6 @@ mem_heap_validate(
block != NULL;
block = UT_LIST_GET_NEXT(list, block)) {
- mem_block_validate(block);
-
switch (block->type) {
case MEM_HEAP_DYNAMIC:
break;
@@ -266,7 +264,6 @@ mem_heap_create_block_func(
|| (type == MEM_HEAP_BUFFER + MEM_HEAP_BTR_SEARCH));
if (heap != NULL) {
- mem_block_validate(heap);
ut_d(mem_heap_validate(heap));
}
@@ -308,7 +305,6 @@ mem_heap_create_block_func(
block->buf_block = buf_block;
block->free_block = NULL;
- block->magic_n = MEM_BLOCK_MAGIC_N;
ut_d(ut_strlcpy_rev(block->file_name, file_name,
sizeof(block->file_name)));
ut_d(block->line = line);
@@ -356,8 +352,6 @@ mem_heap_add_block(
mem_block_t* new_block;
ulint new_size;
- ut_d(mem_block_validate(heap));
-
block = UT_LIST_GET_LAST(heap->base);
/* We have to allocate a new block. The size is always at least
@@ -410,8 +404,6 @@ mem_heap_block_free(
buf_block = static_cast<buf_block_t*>(block->buf_block);
- mem_block_validate(block);
-
UT_LIST_REMOVE(heap->base, block);
ut_ad(heap->total_size >= block->len);
@@ -419,7 +411,6 @@ mem_heap_block_free(
type = heap->type;
len = block->len;
- block->magic_n = MEM_FREED_BLOCK_MAGIC_N;
if (type == MEM_HEAP_DYNAMIC || len < srv_page_size / 2) {
ut_ad(!buf_block);
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index bcc877d3d1f..2a239ca3f23 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -3132,6 +3132,16 @@ row_discard_tablespace_for_mysql(
} else {
ut_ad(!table->n_foreign_key_checks_running);
+ bool fts_exist = (dict_table_has_fts_index(table)
+ || DICT_TF2_FLAG_IS_SET(
+ table, DICT_TF2_FTS_HAS_DOC_ID));
+
+ if (fts_exist) {
+ row_mysql_unlock_data_dictionary(trx);
+ fts_optimize_remove_table(table);
+ row_mysql_lock_data_dictionary(trx);
+ }
+
/* Do foreign key constraint checks. */
err = row_discard_tablespace_foreign_key_checks(trx, table);
@@ -3145,6 +3155,10 @@ row_discard_tablespace_for_mysql(
dropping all indexes of the table. */
err = row_discard_tablespace(trx, table);
}
+
+ if (fts_exist && err != DB_SUCCESS) {
+ fts_optimize_add_table(table);
+ }
}
return(row_discard_tablespace_end(trx, table, err));
@@ -3836,6 +3850,11 @@ funct_exit_all_freed:
trx_commit_for_mysql(trx);
}
+ /* Add the table to fts queue if drop table fails */
+ if (err != DB_SUCCESS && table->fts) {
+ fts_optimize_add_table(table);
+ }
+
row_mysql_unlock_data_dictionary(trx);
}
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index 1852bc5deb6..d7f7e127fea 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -3,7 +3,7 @@
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, 2009 Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -480,7 +480,9 @@ current_time % 60 == 0 and no tasks will be performed when
current_time % 5 != 0. */
# define SRV_MASTER_CHECKPOINT_INTERVAL (7)
-# define SRV_MASTER_PURGE_INTERVAL (10)
+#ifdef MEM_PERIODIC_CHECK
+# define SRV_MASTER_MEM_VALIDATE_INTERVAL (13)
+#endif /* MEM_PERIODIC_CHECK */
# define SRV_MASTER_DICT_LRU_INTERVAL (47)
/** Simulate compression failures. */
diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt
index f22f7c1d6b5..088a24f827b 100644
--- a/storage/tokudb/CMakeLists.txt
+++ b/storage/tokudb/CMakeLists.txt
@@ -168,3 +168,5 @@ TARGET_LINK_LIBRARIES(tokudb tokufractaltree_static tokuportability_static
SET(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -flto -fuse-linker-plugin")
SET(CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO} -flto -fuse-linker-plugin")
+
+ADD_SUBDIRECTORY(man)
diff --git a/storage/tokudb/man/CMakeLists.txt b/storage/tokudb/man/CMakeLists.txt
new file mode 100644
index 00000000000..192d8117119
--- /dev/null
+++ b/storage/tokudb/man/CMakeLists.txt
@@ -0,0 +1,2 @@
+SET(MAN1_TOKUDB tokuftdump.1 tokuft_logprint.1)
+INSTALL(FILES ${MAN1_TOKUDB} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT tokudb-engine)
diff --git a/man/tokuft_logprint.1 b/storage/tokudb/man/tokuft_logprint.1
index c97f7e19f69..c97f7e19f69 100644
--- a/man/tokuft_logprint.1
+++ b/storage/tokudb/man/tokuft_logprint.1
diff --git a/man/tokuftdump.1 b/storage/tokudb/man/tokuftdump.1
index a9c900e0045..a9c900e0045 100644
--- a/man/tokuftdump.1
+++ b/storage/tokudb/man/tokuftdump.1
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result
index 03ef0ed2c09..2e31fc57dd4 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_exch_qa_5_tokudb.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/support-files/CMakeLists.txt b/support-files/CMakeLists.txt
index 863e72928d2..a9f1bf64da8 100644
--- a/support-files/CMakeLists.txt
+++ b/support-files/CMakeLists.txt
@@ -124,21 +124,6 @@ IF(UNIX)
${CMAKE_CURRENT_BINARY_DIR}/mariadb.service
DESTINATION ${inst_location}/systemd COMPONENT SupportFiles)
- IF(INSTALL_SYSTEMD_SYSUSERSDIR)
- CONFIGURE_FILE(sysusers.conf.in
- ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf
- DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} COMPONENT Server)
- ENDIF()
-
- IF(INSTALL_SYSTEMD_TMPFILESDIR)
- get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY)
- CONFIGURE_FILE(tmpfiles.conf.in
- ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY)
- INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf
- DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} COMPONENT Server)
- ENDIF()
-
# @ in directory name broken between CMake version 2.8.12.2 and 3.3
# http://public.kitware.com/Bug/view.php?id=14782
IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM)
@@ -165,6 +150,26 @@ IF(UNIX)
ENDIF()
ENDIF()
+ # Allow installing sysusers and tmpusers without requiring SYSTEMD on the
+ # system. This is useful for distributions running other init systems to
+ # parse these files and create appropriate users & tmpfiles.
+ IF((HAVE_SYSTEMD OR INSTALL_SYSTEMD_SYSUSERS) AND INSTALL_SYSTEMD_SYSUSERSDIR)
+ CONFIGURE_FILE(sysusers.conf.in
+ ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf
+ DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR}
+ RENAME mariadb.conf COMPONENT Server)
+ ENDIF()
+
+ IF((HAVE_SYSTEMD OR INSTALL_SYSTEMD_TMPUSERS) AND INSTALL_SYSTEMD_TMPFILESDIR)
+ get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY)
+ CONFIGURE_FILE(tmpfiles.conf.in
+ ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf
+ DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR}
+ RENAME mariadb.conf COMPONENT Server)
+ ENDIF()
+
IF (INSTALL_SYSCONFDIR)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql-log-rotate DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d
RENAME mysql COMPONENT SupportFiles)