1############# mysql-test\t\relay_log_info_repository_basic.test ###############
2#                                                                             #
3# Variable Name: relay_log_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 relay_log_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_relay_log_info_table.inc
23
24CALL 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####################################################################
30SELECT @@GLOBAL.relay_log_info_repository;
31
32SELECT COUNT(@@GLOBAL.relay_log_info_repository);
33--echo 1 Expected
34
35--error ER_INCORRECT_GLOBAL_LOCAL_VAR
36SELECT COUNT(@@SESSION.relay_log_info_repository);
37
38--echo '#---------------------BS_STVARS_002_02----------------------#'
39####################################################################
40#   Check if Value can set                                         #
41####################################################################
42SET @@GLOBAL.relay_log_info_repository= "TABLE";
43
44SELECT @@GLOBAL.relay_log_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
52--disable_warnings
53SELECT @@GLOBAL.relay_log_info_repository = VARIABLE_VALUE
54FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
55WHERE VARIABLE_NAME='relay_log_info_repository';
56--enable_warnings
57--echo 1 Expected
58
59SELECT COUNT(@@GLOBAL.relay_log_info_repository);
60--echo 1 Expected
61
62--disable_warnings
63SELECT COUNT(VARIABLE_VALUE)
64FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
65WHERE VARIABLE_NAME='relay_log_info_repository';
66--enable_warnings
67--echo 1 Expected
68
69
70--echo '#---------------------BS_STVARS_002_05----------------------#'
71################################################################################
72# Check if relay_log_info_repository can be accessed with and without @@ sign  #
73################################################################################
74
75SELECT COUNT(@@relay_log_info_repository);
76--echo 1 Expected
77
78--error ER_INCORRECT_GLOBAL_LOCAL_VAR
79SELECT COUNT(@@local.relay_log_info_repository);
80
81SELECT COUNT(@@GLOBAL.relay_log_info_repository);
82--echo 1 Expected
83
84
85--echo '#---------------------BS_STVARS_002_06----------------------#'
86################################################################################
87#                                     Clean up                                 #
88################################################################################
89SET @@GLOBAL.relay_log_info_repository= "FILE";
90