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