Debian Codegraph @

mysql-test/suite/sys_vars/t/default_authentication_plugin_basic.test

raw
1
2 ####################################################################
3 # Displaying default value #
4 ####################################################################
5 SELECT @@GLOBAL.default_authentication_plugin;
6 SELECT COUNT(@@GLOBAL.default_authentication_plugin);
7 --echo 1 Expected
8
9
10 ####################################################################
11 # Check if Value can set #
12 ####################################################################
13
14 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
15 SET @@GLOBAL.default_authentication_plugin=1;
16 --echo Expected error 'Read only variable'
17
18 SELECT COUNT(@@GLOBAL.default_authentication_plugin);
19 --echo 1 Expected
20
21
22
23
24 #################################################################
25 # Check if the value in GLOBAL Table matches value in variable #
26 #################################################################
27
28 --disable_warnings
29 SELECT @@GLOBAL.default_authentication_plugin = VARIABLE_VALUE
30 FROM performance_schema.global_variables
31 WHERE VARIABLE_NAME='default_authentication_plugin';
32 --enable_warnings
33 --echo 1 Expected
34
35 SELECT COUNT(@@GLOBAL.default_authentication_plugin);
36 --echo 1 Expected
37
38 --disable_warnings
39 SELECT COUNT(VARIABLE_VALUE)
40 FROM performance_schema.global_variables
41 WHERE VARIABLE_NAME='default_authentication_plugin';
42 --enable_warnings
43 --echo 1 Expected
44
45
46
47 ################################################################################
48 # Check if accessing variable with and without GLOBAL point to same variable #
49 ################################################################################
50 SELECT @@default_authentication_plugin = @@GLOBAL.default_authentication_plugin;
51 --echo 1 Expected
52
53
54
55 ################################################################################
56 # Check if default_authentication_plugin can be accessed with and without #
57 # @@ sign #
58 ################################################################################
59
60 SELECT COUNT(@@default_authentication_plugin);
61 --echo 1 Expected
62
63 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
64 SELECT COUNT(@@local.default_authentication_plugin);
65 --echo Expected error 'Variable is a GLOBAL variable'
66
67 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
68 SELECT COUNT(@@SESSION.default_authentication_plugin);
69 --echo Expected error 'Variable is a GLOBAL variable'
70
71 SELECT COUNT(@@GLOBAL.default_authentication_plugin);
72 --echo 1 Expected
73
74 --Error ER_BAD_FIELD_ERROR
75 SELECT default_authentication_plugin;
76 --echo Expected error 'Unknown column'
77
78