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 SELECT
49 IF(@@GLOBAL.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE
50 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
51 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
52 --echo 1 Expected
53
54 SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates);
55 --echo 1 Expected
56
57 SELECT COUNT(VARIABLE_VALUE)
58 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
59 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
60 --echo 1 Expected
61
62
63 --echo '#---------------------BS_STVARS_002_04----------------------#'
64 #################################################################
65 # Check if the value in SESSION Table matches value in variable #
66 #################################################################
67
68 SELECT
69 IF(@@SESSION.binlog_direct_non_transactional_updates, "ON", "OFF") = VARIABLE_VALUE
70 FROM INFORMATION_SCHEMA.SESSION_VARIABLES
71 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
72 --echo 1 Expected
73
74 SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates);
75 --echo 1 Expected
76
77 SELECT COUNT(VARIABLE_VALUE)
78 FROM INFORMATION_SCHEMA.SESSION_VARIABLES
79 WHERE VARIABLE_NAME='binlog_direct_non_transactional_updates';
80 --echo 1 Expected
81
82
83 --echo '#---------------------BS_STVARS_002_05----------------------#'
84 ################################################################################
85 # Check if binlog_format can be accessed with and without @@ sign #
86 ################################################################################
87
88 SELECT COUNT(@@binlog_direct_non_transactional_updates);
89 --echo 1 Expected
90 SELECT COUNT(@@local.binlog_direct_non_transactional_updates);
91 --echo 1 Expected
92 SELECT COUNT(@@SESSION.binlog_direct_non_transactional_updates);
93 --echo 1 Expected
94 SELECT COUNT(@@GLOBAL.binlog_direct_non_transactional_updates);
95 --echo 1 Expected
96
97 SET @@global.binlog_direct_non_transactional_updates= @start_value;