-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathcheck_proxy_users_func.test
65 lines (54 loc) · 2.68 KB
/
check_proxy_users_func.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
############ mysql-test\t\check_proxy_users_func.test###########################
# #
#Variable Name: check_proxy_users #
#Scope: SESSION #
#Access Type: Dynamic #
#Data Type: BOOLEAN #
#Default Value: OFF #
#Values: ON, OFF #
# #
# #
#Creation Date: 2015-01-20 #
#Author: Todd Farmer #
# #
#Description: Test Cases of Dynamic System Variable "check_proxy_users" #
# that checks behavior of this variable in the following ways #
# * Functionality based on different values #
# #
#Reference: http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#
# option_mysqld_check_proxy_users #
# #
################################################################################
--echo ** Setup **
--echo
#
# Setup
#
SET @default_check_proxy_users = @@check_proxy_users;
--echo '#----- 1.2.4 superuser set variable -------------------------#'
###################################
# Setting Read only value ON #
###################################
SET Global check_proxy_users=OFF;
--echo '#----- 1.2.4 others user set variable -----------------------#'
##########################################
# Creating user without Super privilege #
##########################################
--echo ** Creating new user with out super privilege**
CREATE USER sameea;
--echo ** Connecting connn using username 'sameea' **
CONNECT (connn,localhost,sameea,,);
--Error ER_SPECIFIC_ACCESS_DENIED_ERROR
SET GLOBAL check_proxy_users=ON;
--Error ER_SPECIFIC_ACCESS_DENIED_ERROR
SET @@global.check_proxy_users=ON;
#
# Cleanup
#
--echo ** Connection default **
connection default;
--echo ** Disconnecting connn **
DISCONNECT connn;
DROP USER sameea;
SET global check_proxy_users = @default_check_proxy_users;
--disable_info