1SET @session_start_value = @@session.sql_warnings;
2SELECT @session_start_value;
3@session_start_value
40
5'#--------------------FN_DYNVARS_166_01------------------------#'
6SET @@session.sql_warnings = 0;
7SET @@session.sql_warnings = DEFAULT;
8SELECT @@session.sql_warnings;
9@@session.sql_warnings
100
11SET @@session.sql_warnings = 1;
12SET @@session.sql_warnings = DEFAULT;
13SELECT @@session.sql_warnings;
14@@session.sql_warnings
150
16'#---------------------FN_DYNVARS_166_02-------------------------#'
17SET sql_warnings = 1;
18SELECT @@sql_warnings;
19@@sql_warnings
201
21SELECT session.sql_warnings;
22ERROR 42S02: Unknown table 'session' in field list
23SELECT local.sql_warnings;
24ERROR 42S02: Unknown table 'local' in field list
25SET session sql_warnings = 0;
26SELECT @@session.sql_warnings;
27@@session.sql_warnings
280
29'#--------------------FN_DYNVARS_166_03------------------------#'
30SET @@session.sql_warnings = 0;
31SELECT @@session.sql_warnings;
32@@session.sql_warnings
330
34SET @@session.sql_warnings = 1;
35SELECT @@session.sql_warnings;
36@@session.sql_warnings
371
38'#--------------------FN_DYNVARS_166_04-------------------------#'
39SET @@session.sql_warnings = 0.6;
40ERROR 42000: Incorrect argument type to variable 'sql_warnings'
41SET @@session.sql_warnings = "T";
42ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'T'
43SET @@session.sql_warnings = "Y";
44ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'Y'
45SET @@session.sql_warnings = TR�E;
46ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'TR�E'
47SET @@session.sql_warnings = �N;
48ERROR 42000: Variable 'sql_warnings' can't be set to the value of '�N'
49SET @@session.sql_warnings = OF;
50ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'OF'
51SET @@session.sql_warnings = �FF;
52ERROR 42000: Variable 'sql_warnings' can't be set to the value of '�FF'
53SET @@session.sql_warnings = '�';
54ERROR 42000: Variable 'sql_warnings' can't be set to the value of '�'
55SET @@session.sql_warnings = NO;
56ERROR 42000: Variable 'sql_warnings' can't be set to the value of 'NO'
57'#-------------------FN_DYNVARS_166_05----------------------------#'
58SET @@global.sql_warnings = 1-@@global.sql_warnings;
59SELECT @@global.sql_warnings;
60@@global.sql_warnings
611
62SET @@global.sql_warnings = 1-@@global.sql_warnings;
63SELECT @@global.sql_warnings;
64@@global.sql_warnings
650
66'#----------------------FN_DYNVARS_166_06------------------------#'
67SELECT count(VARIABLE_VALUE)
68FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
69WHERE VARIABLE_NAME='sql_warnings';
70count(VARIABLE_VALUE)
711
72'#----------------------FN_DYNVARS_166_07------------------------#'
73SELECT IF(@@session.sql_warnings, "ON", "OFF") = VARIABLE_VALUE
74FROM INFORMATION_SCHEMA.SESSION_VARIABLES
75WHERE VARIABLE_NAME='sql_warnings';
76IF(@@session.sql_warnings, "ON", "OFF") = VARIABLE_VALUE
771
78SELECT @@session.sql_warnings;
79@@session.sql_warnings
801
81SELECT VARIABLE_VALUE
82FROM INFORMATION_SCHEMA.SESSION_VARIABLES
83WHERE VARIABLE_NAME='sql_warnings';
84VARIABLE_VALUE
85ON
86'#---------------------FN_DYNVARS_166_08-------------------------#'
87SET @@session.sql_warnings = OFF;
88SELECT @@session.sql_warnings;
89@@session.sql_warnings
900
91SET @@session.sql_warnings = ON;
92SELECT @@session.sql_warnings;
93@@session.sql_warnings
941
95'#---------------------FN_DYNVARS_166_09----------------------#'
96SET @@session.sql_warnings = TRUE;
97SELECT @@session.sql_warnings;
98@@session.sql_warnings
991
100SET @@session.sql_warnings = FALSE;
101SELECT @@session.sql_warnings;
102@@session.sql_warnings
1030
104SET @@session.sql_warnings = @session_start_value;
105SELECT @@session.sql_warnings;
106@@session.sql_warnings
1070
108