Debian Codegraph @

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

raw
1 ############## mysql-test\t\master_info_repository_basic.test #################
2 # #
3 # Variable Name: master_info_repository #
4 # Scope: Global #
5 # Access Type: Static #
6 # Data Type: enumeration #
7 # #
8 # #
9 # Creation Date: 2010-06-19 #
10 # Author : Alfranio Correia #
11 # #
12 # #
13 # Description:Test Cases of System Variable master_info_repository #
14 # that checks the behavior of this variable in the following ways #
15 # * Value Check #
16 # * Scope Check #
17 # #
18 # Reference: #
19 # http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
20 # #
21 ###############################################################################
22 --source include/not_master_info_file.inc
23
24 CALL mtr.add_suppression("The repository is not configured properly. Please, fix this before using replication.");
25
26 --echo '#---------------------BS_STVARS_002_01----------------------#'
27 ####################################################################
28 # Displaying default value #
29 ####################################################################
30 SELECT @@GLOBAL.master_info_repository;
31
32 SELECT COUNT(@@GLOBAL.master_info_repository);
33 --echo 1 Expected
34
35 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
36 SELECT COUNT(@@SESSION.master_info_repository);
37
38 --echo '#---------------------BS_STVARS_002_02----------------------#'
39 ####################################################################
40 # Check if Value can set #
41 ####################################################################
42 SET @@GLOBAL.master_info_repository= "FILE";
43
44 SELECT @@GLOBAL.master_info_repository;
45
46
47 --echo '#---------------------BS_STVARS_002_03----------------------#'
48 #################################################################
49 # Check if the value in GLOBAL Table matches value in variable #
50 #################################################################
51 --disable_warnings
52 SELECT @@GLOBAL.master_info_repository = VARIABLE_VALUE
53 FROM performance_schema.global_variables
54 WHERE VARIABLE_NAME='master_info_repository';
55 --enable_warnings
56 --echo 1 Expected
57
58 SELECT COUNT(@@GLOBAL.master_info_repository);
59 --echo 1 Expected
60
61 --disable_warnings
62 SELECT COUNT(VARIABLE_VALUE)
63 FROM performance_schema.global_variables
64 WHERE VARIABLE_NAME='master_info_repository';
65 --enable_warnings
66 --echo 1 Expected
67
68
69 --echo '#---------------------BS_STVARS_002_05----------------------#'
70 ################################################################################
71 # Check if master_info_repository can be accessed with and without @@ sign #
72 ################################################################################
73
74 SELECT COUNT(@@master_info_repository);
75 --echo 1 Expected
76
77 --error ER_INCORRECT_GLOBAL_LOCAL_VAR
78 SELECT COUNT(@@local.master_info_repository);
79
80 SELECT COUNT(@@GLOBAL.master_info_repository);
81 --echo 1 Expected
82
83
84 --echo '#---------------------BS_STVARS_002_06----------------------#'
85 ################################################################################
86 # Clean up #
87 ################################################################################
88 SET @@GLOBAL.master_info_repository= "TABLE";