1** Setup **
2
3SET @default_sql_warnings = @@sql_warnings;
4CREATE TEMPORARY TABLE t1(a varchar(5), b varchar(20));
5'#-----------------------------FN_DYNVARS_167_01------------#'
6SET @@sql_warnings = DEFAULT;
7affected rows: 0
8INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
9affected rows: 1
10'#-----------------------------FN_DYNVARS_167_02------------------#'
11SET @@sql_warnings = 0;
12affected rows: 0
13INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
14affected rows: 1
15'#-----------------------------FN_DYNVARS_167_03---------------#'
16SET @@sql_warnings = 1;
17affected rows: 0
18INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
19affected rows: 1
20info: Records: 1  Duplicates: 0  Warnings: 1
21'#----------------------------FN_DYNVARS_167_04---------------#'
22connect  con_int1,localhost,root,,;
23connection con_int1;
24SELECT @@SESSION.sql_warnings;
25@@SESSION.sql_warnings
260
270 / FALSE Expected
28SET SESSION sql_warnings = FALSE;
29connect  con_int2,localhost,root,,;
30connection con_int2;
31SELECT @@SESSION.sql_warnings;
32@@SESSION.sql_warnings
330
340 / FALSE Expected
35SET SESSION sql_warnings = TRUE;
36connection con_int2;
37SELECT @@SESSION.sql_warnings;
38@@SESSION.sql_warnings
391
401 / TRUE Expected
41connection con_int1;
42SELECT @@SESSION.sql_warnings;
43@@SESSION.sql_warnings
440
450 / FALSE Expected
46connection default;
47disconnect con_int1;
48disconnect con_int2;
49DROP TABLE t1;
50SET @@sql_warnings = @default_sql_warnings;
51