| 1 |
CREATE USER 'u1'@'localhost'; |
| 2 |
# |
| 3 |
# TC1. Check unprivileged setting of sub-set of variables |
| 4 |
# ------------------------------------------------------- |
| 5 |
# |
| 6 |
SET auto_increment_increment = 1; |
| 7 |
SET auto_increment_offset = 1; |
| 8 |
SET collation_database = 1; |
| 9 |
Warnings: |
| 10 |
Warning 1681 Updating 'collation_database' is deprecated. It will be made read-only in a future release. |
| 11 |
SET explicit_defaults_for_timestamp = 1; |
| 12 |
SET default_collation_for_utf8mb4 = utf8mb4_0900_ai_ci; |
| 13 |
Warnings: |
| 14 |
Warning 1681 Updating 'default_collation_for_utf8mb4' is deprecated. It will be made read-only in a future release. |
| 15 |
SET rbr_exec_mode = IDEMPOTENT; |
| 16 |
# |
| 17 |
# TC2. Check `REPLICATION_APPLIER` privilege sufficient for setting |
| 18 |
# sub-set of variables |
| 19 |
# ----------------------------------------------------------------- |
| 20 |
# |
| 21 |
SET gtid_next = AUTOMATIC; |
| 22 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN, SESSION_VARIABLES_ADMIN or REPLICATION_APPLIER privilege(s) for this operation |
| 23 |
SET original_commit_timestamp = 1; |
| 24 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN, SESSION_VARIABLES_ADMIN or REPLICATION_APPLIER privilege(s) for this operation |
| 25 |
SET original_server_version = 1; |
| 26 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN, SESSION_VARIABLES_ADMIN or REPLICATION_APPLIER privilege(s) for this operation |
| 27 |
SET immediate_server_version = 1; |
| 28 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN, SESSION_VARIABLES_ADMIN or REPLICATION_APPLIER privilege(s) for this operation |
| 29 |
SET pseudo_replica_mode = 1; |
| 30 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN, SESSION_VARIABLES_ADMIN or REPLICATION_APPLIER privilege(s) for this operation |
| 31 |
GRANT REPLICATION_APPLIER ON *.* TO 'u1'@'localhost'; |
| 32 |
SET gtid_next = AUTOMATIC; |
| 33 |
SET original_commit_timestamp = 1; |
| 34 |
SET original_server_version = 1; |
| 35 |
SET immediate_server_version = 1; |
| 36 |
SET pseudo_replica_mode = 1; |
| 37 |
# |
| 38 |
# TC3. Check privileges are kept the same while setting sub-set of |
| 39 |
# variables |
| 40 |
# ---------------------------------------------------------------- |
| 41 |
# |
| 42 |
SET pseudo_thread_id = 1; |
| 43 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation |
| 44 |
SET sql_require_primary_key = 1; |
| 45 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation |
| 46 |
SET default_table_encryption = 1; |
| 47 |
ERROR 42000: Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN and TABLE_ENCRYPTION_ADMIN privilege(s) for this operation |
| 48 |
DROP USER 'u1'@'localhost'; |