Debian Codegraph @

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

raw
1 ############# mysql-test\t\log_bin_use_v1_row_events_basic.test ###############
2 # #
3 # Variable Name: log_bin_use_v1_row_events #
4 # Scope: Global #
5 # Access Type: Static #
6 # Data Type: bool #
7 # #
8 # #
9 # Creation Date: 2011-11-23 #
10 # Author : Frazer Clement #
11 # #
12 # #
13 # Description:Test Cases of Static System Variable log_bin_use_v1_row_events #
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.X/en/server-system-variables.html #
20 # #
21 ###############################################################################
22
23
24 --echo '#---------------------BS_STVARS_002_01----------------------#'
25 ####################################################################
26 # Displaying default value #
27 ####################################################################
28 SET @start_value= @@global.log_bin_use_v1_row_events;
29 SELECT @start_value;
30
31 SELECT COUNT(@@GLOBAL.log_bin_use_v1_row_events);
32 --echo 1 Expected
33
34 --echo '#---------------------BS_STVARS_002_02----------------------#'
35 ####################################################################
36 # Check if Value can set #
37 ####################################################################
38 SET @@global.log_bin_use_v1_row_events = TRUE;
39 SET @@global.log_bin_use_v1_row_events = DEFAULT;
40 SELECT @@global.log_bin_use_v1_row_events;
41
42 SET @@global.log_bin_use_v1_row_events = ON;
43 SELECT @@global.log_bin_use_v1_row_events;
44 SET @@global.log_bin_use_v1_row_events = OFF;
45 SELECT @@global.log_bin_use_v1_row_events;
46 SET @@global.log_bin_use_v1_row_events = 1;
47 SELECT @@global.log_bin_use_v1_row_events;
48 SET @@global.log_bin_use_v1_row_events = 0;
49 SELECT @@global.log_bin_use_v1_row_events;
50 SET @@global.log_bin_use_v1_row_events = TRUE;
51 SELECT @@global.log_bin_use_v1_row_events;
52 SET @@global.log_bin_use_v1_row_events = FALSE;
53 SELECT @@global.log_bin_use_v1_row_events;
54
55 --echo '#-------------------FN_DYNVARS_063_04----------------------------#'
56 ###############################################################################
57 # Test if accessing session log_bin_use_v1_row_events gives error #
58 ###############################################################################
59
60 --Error ER_GLOBAL_VARIABLE
61 SET @@session.log_bin_use_v1_row_events = 0;
62 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
63 SELECT @@session.log_bin_use_v1_row_events;
64
65 --echo '#---------------------BS_STVARS_002_03----------------------#'
66 #################################################################
67 # Check if the value in GLOBAL Table matches value in variable #
68 #################################################################
69
70 --disable_warnings
71 SELECT IF(@@GLOBAL.log_bin_use_v1_row_events, "ON", "OFF") = VARIABLE_VALUE
72 FROM performance_schema.global_variables
73 WHERE VARIABLE_NAME='log_bin_use_v1_row_events';
74 --enable_warnings
75 --echo 1 Expected
76
77 SELECT COUNT(@@GLOBAL.log_bin_use_v1_row_events);
78 --echo 1 Expected
79
80 --disable_warnings
81 SELECT COUNT(VARIABLE_VALUE)
82 FROM performance_schema.global_variables
83 WHERE VARIABLE_NAME='log_bin_use_v1_row_events';
84 --enable_warnings
85 --echo 1 Expected
86
87
88 --echo '#---------------------BS_STVARS_002_05----------------------#'
89 ################################################################################
90 # Check if log_bin_use_v1_row_events can be accessed with and without @@ sign #
91 ################################################################################
92
93 SELECT COUNT(@@log_bin_use_v1_row_events);
94 --echo 1 Expected
95 SELECT COUNT(@@GLOBAL.log_bin_use_v1_row_events);
96 --echo 1 Expected
97
98 SET @@global.log_bin_use_v1_row_events= @start_value;
99