1SET @start_value = @@global.autocommit;
2SELECT @start_value;
3@start_value
41
5'#--------------------FN_DYNVARS_003_01------------------------#'
6SET @@autocommit = 0;
7SET @@autocommit = DEFAULT;
8SELECT @@autocommit;
9@@autocommit
101
11'#---------------------FN_DYNVARS_003_02-------------------------#'
12SET @@autocommit = @start_value;
13SELECT @@autocommit = 1;
14@@autocommit = 1
151
16'#--------------------FN_DYNVARS_003_03------------------------#'
17SET @@autocommit = 0;
18SELECT @@autocommit;
19@@autocommit
200
21SET @@autocommit = 1;
22SELECT @@autocommit;
23@@autocommit
241
25'#--------------------FN_DYNVARS_003_04-------------------------#'
26SET @@autocommit = 2;
27ERROR 42000: Variable 'autocommit' can't be set to the value of '2'
28SET @@autocommit = -1;
29ERROR 42000: Variable 'autocommit' can't be set to the value of '-1'
30SET @@autocommit = TRUEF;
31ERROR 42000: Variable 'autocommit' can't be set to the value of 'TRUEF'
32SET @@autocommit = TRUE_F;
33ERROR 42000: Variable 'autocommit' can't be set to the value of 'TRUE_F'
34SET @@autocommit = FALSE0;
35ERROR 42000: Variable 'autocommit' can't be set to the value of 'FALSE0'
36SET @@autocommit = OON;
37ERROR 42000: Variable 'autocommit' can't be set to the value of 'OON'
38SET @@autocommit = ONN;
39ERROR 42000: Variable 'autocommit' can't be set to the value of 'ONN'
40SET @@autocommit = OOFF;
41ERROR 42000: Variable 'autocommit' can't be set to the value of 'OOFF'
42SET @@autocommit = 0FF;
43ERROR 42000: Variable 'autocommit' can't be set to the value of '0FF'
44SET @@autocommit = ' ';
45ERROR 42000: Variable 'autocommit' can't be set to the value of ' '
46SET @@autocommit = " ";
47ERROR 42000: Variable 'autocommit' can't be set to the value of ' '
48SET @@autocommit = '';
49ERROR 42000: Variable 'autocommit' can't be set to the value of ''
50'#-------------------FN_DYNVARS_003_05----------------------------#'
51SET @@global.autocommit = 0;
52SELECT @@global.autocommit;
53@@global.autocommit
540
55SET @@global.autocommit = 1;
56'#----------------------FN_DYNVARS_003_06------------------------#'
57SELECT IF(@@session.autocommit, "ON", "OFF") = VARIABLE_VALUE
58FROM INFORMATION_SCHEMA.SESSION_VARIABLES
59WHERE VARIABLE_NAME='autocommit';
60IF(@@session.autocommit, "ON", "OFF") = VARIABLE_VALUE
611
62'#----------------------FN_DYNVARS_003_07------------------------#'
63SET @@autocommit = 1;
64SELECT IF(@@autocommit, "ON", "OFF") = VARIABLE_VALUE
65FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
66WHERE VARIABLE_NAME='autocommit';
67IF(@@autocommit, "ON", "OFF") = VARIABLE_VALUE
681
69'#---------------------FN_DYNVARS_003_08-------------------------#'
70SET @@autocommit = OFF;
71SELECT @@autocommit;
72@@autocommit
730
74SET @@autocommit = ON;
75SELECT @@autocommit;
76@@autocommit
771
78'#---------------------FN_DYNVARS_003_09----------------------#'
79SET @@autocommit = TRUE;
80SELECT @@autocommit;
81@@autocommit
821
83SET @@autocommit = FALSE;
84SELECT @@autocommit;
85@@autocommit
860
87'#---------------------FN_DYNVARS_003_10----------------------#'
88SET @@autocommit = 0;
89SELECT @@autocommit = @@local.autocommit;
90@@autocommit = @@local.autocommit
911
92SELECT @@local.autocommit = @@session.autocommit;
93@@local.autocommit = @@session.autocommit
941
95SET @@autocommit = 1;
96SELECT @@autocommit = @@local.autocommit;
97@@autocommit = @@local.autocommit
981
99SELECT @@session.autocommit = @@autocommit;
100@@session.autocommit = @@autocommit
1011
102'#---------------------FN_DYNVARS_003_11----------------------#'
103SET autocommit = 1;
104SELECT @@autocommit;
105@@autocommit
1061
107SELECT local.autocommit;
108ERROR 42S02: Unknown table 'local' in field list
109SELECT session.autocommit;
110ERROR 42S02: Unknown table 'session' in field list
111SELECT autocommit = @@session.autocommit;
112ERROR 42S22: Unknown column 'autocommit' in 'field list'
113SET @@global.autocommit = @start_value;
114SELECT @@global.autocommit;
115@@global.autocommit
1161
117