Debian Codegraph @

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

raw
1 ######### mysql-test\t\binlog_direct_non_transactional_updates.test ###########
2 # #
3 # Variable Name: binlog_direct_non_transactional_updates #
4 # Scope: Global & Session #
5 # Access Type: Static #
6 # Data Type: bool #
7 # #
8 # Description:Test Cases of Dynamic System Variable #
9 # binlog_direct_non_transactional_updates #
10 # that checks the behavior of this variable in the following ways #
11 # * Value Check #
12 # * Scope Check #
13 # #
14 # Reference: #
15 # http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
16 # #
17 ###############################################################################
18
19 SELECT @@GLOBAL.binlog_direct_non_transactional_updates;
20
21 --echo '#---------------------BS_STVARS_002_01----------------------#'
22 ####################################################################
23 # Displaying default value #
24 ####################################################################
25 SET @start_value= @@global.binlog_direct_non_transactional_updates;
26
27 SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates);
28 --echo 1 Expected
29
30 SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates);
31 --echo 1 Expected
32
33 --echo '#---------------------BS_STVARS_002_02----------------------#'
34 ####################################################################
35 # Check if Value can set #
36 ####################################################################
37 SET @@GLOBAL.binlog_direct_non_transactional_updates=TRUE;
38 SELECT @@GLOBAL.binlog_direct_non_transactional_updates;
39
40 SET @@SESSION.binlog_direct_non_transactional_updates=TRUE;
41 SELECT @@SESSION.binlog_direct_non_transactional_updates;
42
43 --echo '#---------------------BS_STVARS_002_03----------------------#'
44 #################################################################
45 # Check if the value in GLOBAL Table matches value in variable #
46 #################################################################
47
48 --disable_warnings
49 SELECT
50 IF(@@GLOBAL.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE
51 FROM performance_schema.global_variables
52 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
53 --enable_warnings
54 --echo 1 Expected
55
56 SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates);
57 --echo 1 Expected
58
59 --disable_warnings
60 SELECT COUNT(VARIABLE_VALUE)
61 FROM performance_schema.global_variables
62 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
63 --enable_warnings
64 --echo 1 Expected
65
66
67 --echo '#---------------------BS_STVARS_002_04----------------------#'
68 #################################################################
69 # Check if the value in SESSION Table matches value in variable #
70 #################################################################
71
72 --disable_warnings
73 SELECT
74 IF(@@SESSION.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE
75 FROM performance_schema.session_variables
76 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
77 --enable_warnings
78 --echo 1 Expected
79
80 SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates);
81 --echo 1 Expected
82
83 --disable_warnings
84 SELECT COUNT(VARIABLE_VALUE)
85 FROM performance_schema.session_variables
86 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
87 --enable_warnings
88 --echo 1 Expected
89
90
91 --echo '#---------------------BS_STVARS_002_05----------------------#'
92 ################################################################################
93 # Check if binlog_format can be accessed with and without @@ sign #
94 ################################################################################
95
96 SELECT COUNT(@@binlog_direct_non_transactional_updates);
97 --echo 1 Expected
98 SELECT COUNT(@@local.binlog_direct_non_transactional_updates);
99 --echo 1 Expected
100 SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates);
101 --echo 1 Expected
102 SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates);
103 --echo 1 Expected
104
105 SET @@global.binlog_direct_non_transactional_updates= @start_value;