Debian Codegraph @

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

raw
1 ############## mysql-test\t\slave_ddl_exec_mode_basic.test ####################
2 # #
3 # Variable Name: slave_ddl_exec_mode #
4 # Scope: GLOBAL & SESSION #
5 # Access Type: Dynamic #
6 # Data Type: Numeric #
7 # Default Value: 1 #
8 # Range: 1 - 65536 #
9 # #
10 # #
11 # Description: Test Cases of Dynamic System Variable slave_ddl_exec_mode #
12 # that checks the behavior of this variable in the following ways#
13 # * Default Value #
14 # * Valid & Invalid values #
15 # * Scope & Access method #
16 # * Data Integrity #
17 # #
18 ###############################################################################
19
20 --source include/not_embedded.inc
21 --source include/load_sysvars.inc
22
23 ########################################################################
24 # START OF slave_ddl_exec_mode TESTS #
25 ########################################################################
26
27 SET @start_value = @@global.slave_ddl_exec_mode;
28
29 SELECT @@global.slave_ddl_exec_mode;
30
31 SELECT @@slave_ddl_exec_mode = @@GLOBAL.slave_ddl_exec_mode;
32 --echo 1 Expected
33
34 SELECT COUNT(@@slave_ddl_exec_mode);
35 --echo 1 Expected
36
37 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
38 SELECT COUNT(@@local.slave_ddl_exec_mode);
39 --echo Expected error 'Variable is a GLOBAL variable'
40
41 --Error ER_INCORRECT_GLOBAL_LOCAL_VAR
42 SELECT COUNT(@@SESSION.slave_ddl_exec_mode);
43 --echo Expected error 'Variable is a GLOBAL variable'
44
45 SELECT COUNT(@@GLOBAL.slave_ddl_exec_mode);
46 --echo 1 Expected
47
48 --Error ER_BAD_FIELD_ERROR
49 SELECT slave_ddl_exec_mode = @@SESSION.version;
50 --echo Expected error 'Readonly variable'
51
52
53 SET @@GLOBAL.slave_ddl_exec_mode=STRICT;
54 SELECT @@GLOBAL.slave_ddl_exec_mode;
55
56 SET @@GLOBAL.slave_ddl_exec_mode=IDEMPOTENT;
57 SELECT @@GLOBAL.slave_ddl_exec_mode;
58
59 --error ER_WRONG_VALUE_FOR_VAR
60 SET @@GLOBAL.slave_ddl_exec_mode=XXX;
61 SELECT @@GLOBAL.slave_ddl_exec_mode;
62
63 SET @@global.slave_ddl_exec_mode= @start_value;
64
65 ########################################################################
66 # END OF slave_ddl_exec_mode TESTS #
67 ########################################################################