Debian Codegraph @

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

raw
1 # #
2 # Variable Name: mysqlx_bind_address #
3 # Scope: Global #
4 # Access Type: Static #
5 # Data Type: filename #
6 ###############################################################################
7
8 ####################################################################
9 # Displaying default value #
10 ####################################################################
11 SELECT COUNT(@@GLOBAL.mysqlx_bind_address);
12 --echo 1 Expected
13 ####################################################################
14 # Check if Value can set #
15 ####################################################################
16 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
17 SET @@GLOBAL.mysqlx_bind_address=1;
18 --echo Expected error 'Read only variable'
19
20 --disable_warnings
21 SELECT VARIABLE_VALUE = ''
22 FROM performance_schema.global_variables
23 WHERE VARIABLE_NAME='mysqlx_bind_address';
24 --enable_warnings
25 --echo 0 Expected
26
27 SELECT COUNT(VARIABLE_VALUE)
28 FROM performance_schema.global_variables
29 WHERE VARIABLE_NAME='mysqlx_bind_address';
30 --echo 1 Expected
31 ################################################################################
32 # Check if accessing variable with and without GLOBAL point to same variable #
33 ################################################################################
34 SELECT @@mysqlx_bind_address is NULL AND @@GLOBAL.mysqlx_bind_address is NULL;
35 --echo 0 Expected
36
37 SELECT @@mysqlx_bind_address is NOT NULL AND @@GLOBAL.mysqlx_bind_address is NOT NULL;
38 --echo 1 Expected
39 ################################################################################
40 # Check if bind_address can be accessed with and without @@ sign #
41 ################################################################################
42
43 SELECT COUNT(@@mysqlx_bind_address);
44 --echo 1 Expected
45
46 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
47 SELECT COUNT(@@local.mysqlx_bind_address);
48 --echo Expected error 'Variable is a GLOBAL variable'
49
50 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
51 SELECT COUNT(@@SESSION.mysqlx_bind_address);
52 --echo Expected error 'Variable is a GLOBAL variable'
53
54 SELECT COUNT(@@GLOBAL.mysqlx_bind_address);
55 --echo 1 Expected
56
57 --Error ER_BAD_FIELD_ERROR
58 SELECT mysqlx_bind_address;
59 --echo Expected error 'Unknown column'
60
61