summaryrefslogtreecommitdiff
path: root/mysql-test/suite/sys_vars/r/log_result_errors_basic.result
blob: 5d3696901a6b031fbfb6d49e6dbe18f71bd9aa3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
SET @start_global_value = @@global.log_result_errors;
SELECT @start_global_value;
@start_global_value
0
SET @start_session_value = @@session.log_result_errors;
SELECT @start_session_value;
@start_session_value
0
'#--------------------FN_DYNVARS_067_01-------------------------#'
SET @@global.log_result_errors = 1;
SET @@global.log_result_errors = DEFAULT;
SELECT @@global.log_result_errors;
@@global.log_result_errors
0
SET @@session.log_result_errors = 2;
SET @@session.log_result_errors = DEFAULT;
SELECT @@session.log_result_errors;
@@session.log_result_errors
0
'#--------------------FN_DYNVARS_067_02-------------------------#'
SET @@global.log_result_errors = DEFAULT;
SELECT @@global.log_result_errors = 0;
@@global.log_result_errors = 0
1
SET @@session.log_result_errors = DEFAULT;
SELECT @@session.log_result_errors = 0;
@@session.log_result_errors = 0
1
'#--------------------FN_DYNVARS_067_03-------------------------#'
SET @@global.log_result_errors = 0;
SELECT @@global.log_result_errors;
@@global.log_result_errors
0
SET @@global.log_result_errors = 1;
SELECT @@global.log_result_errors;
@@global.log_result_errors
1
SET @@global.log_result_errors = 3;
SELECT @@global.log_result_errors;
@@global.log_result_errors
3
'#--------------------FN_DYNVARS_067_04-------------------------#'
SET @@session.log_result_errors = 0;
SELECT @@session.log_result_errors;
@@session.log_result_errors
0
SET @@session.log_result_errors = 1;
SELECT @@session.log_result_errors;
@@session.log_result_errors
1
SET @@session.log_result_errors = 3;
SELECT @@session.log_result_errors;
@@session.log_result_errors
3
'#------------------FN_DYNVARS_067_05-----------------------#'
SET @@global.log_result_errors = 4;
Warnings:
Warning	1292	Truncated incorrect log_result_errors value: '4'
SELECT @@global.log_result_errors;
@@global.log_result_errors
3
SET @@global.log_result_errors = 65530.34;
ERROR 42000: Incorrect argument type to variable 'log_result_errors'
SELECT @@global.log_result_errors;
@@global.log_result_errors
3
SET @@global.log_result_errors = test;
ERROR 42000: Incorrect argument type to variable 'log_result_errors'
SELECT @@global.log_result_errors;
@@global.log_result_errors
3
SET @@session.log_result_errors = -2;
Warnings:
Warning	1292	Truncated incorrect log_result_errors value: '-2'
SELECT @@session.log_result_errors;
@@session.log_result_errors
0
SET @@session.log_result_errors = 65530.34;
ERROR 42000: Incorrect argument type to variable 'log_result_errors'
SET @@session.log_result_errors = test;
ERROR 42000: Incorrect argument type to variable 'log_result_errors'
SELECT @@session.log_result_errors;
@@session.log_result_errors
0
'#------------------FN_DYNVARS_067_06-----------------------#'
SELECT @@global.log_result_errors = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
WHERE VARIABLE_NAME='log_result_errors';
@@global.log_result_errors = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_067_07-----------------------#'
SELECT @@session.log_result_errors = VARIABLE_VALUE 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
WHERE VARIABLE_NAME='log_result_errors';
@@session.log_result_errors = VARIABLE_VALUE
1
'#------------------FN_DYNVARS_067_08-----------------------#'
SET @@global.log_result_errors = TRUE;
SELECT @@global.log_result_errors;
@@global.log_result_errors
1
SET @@global.log_result_errors = FALSE;
SELECT @@global.log_result_errors;
@@global.log_result_errors
0
'#---------------------FN_DYNVARS_067_09----------------------#'
SET @@session.log_result_errors = 1;
SET @@global.log_result_errors = 2;
SELECT @@log_result_errors = @@global.log_result_errors;
@@log_result_errors = @@global.log_result_errors
0
'#---------------------FN_DYNVARS_067_10----------------------#'
SET @@session.log_result_errors = 1;
SET @@global.log_result_errors = 2;
SELECT @@log_result_errors = @@local.log_result_errors;
@@log_result_errors = @@local.log_result_errors
1
SELECT @@local.log_result_errors = @@session.log_result_errors;
@@local.log_result_errors = @@session.log_result_errors
1
SET @@session.log_result_errors = 1;
create table t1(a int primary key);
insert into t1 values(1);
insert into t1 values(1);
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
insert ignore into t1 values(1);
Warnings:
Warning	1062	Duplicate entry '1' for key 'PRIMARY'
SET @@session.log_result_errors = 3;
insert ignore into t1 values(1);
Warnings:
Warning	1062	Duplicate entry '1' for key 'PRIMARY'
drop table t1;
SET @@global.log_result_errors = @start_global_value;
SELECT @@global.log_result_errors;
@@global.log_result_errors
0
SET @@session.log_result_errors = @start_session_value;
SELECT @@session.log_result_errors;
@@session.log_result_errors
0
[WARN RESULT] affected_rows: 0  status: 2  warning_count: 1
[WARN RESULT] Level: Warning  Code: 1292  'Truncated incorrect log_result_errors value: '4''
[ERROR RESULT] Code: 1232 'Incorrect argument type to variable 'log_result_errors''
[ERROR RESULT] Code: 1232 'Incorrect argument type to variable 'log_result_errors''
[ERROR RESULT] Code: 1062 'Duplicate entry '1' for key 'PRIMARY''
[WARN RESULT] affected_rows: 0  status: 2  warning_count: 1
[WARN RESULT] Level: Warning  Code: 1062  'Duplicate entry '1' for key 'PRIMARY''