Debian Codegraph @

mysql-test/suite/binlog_nogtid/r/binlog_unsafe.result

raw
1 SET @old_log_output=@@global.log_output;
2 SET GLOBAL log_output="FILE,TABLE";
3 #### Setup tables ####
4 CREATE TABLE t0 (a VARCHAR(510));
5 CREATE TABLE t1 (a CHAR(100));
6 CREATE TABLE t2 (a CHAR(100));
7 CREATE TABLE t3 (a CHAR(100));
8 CREATE TABLE ta0 (a CHAR(100));
9 CREATE TABLE ta1 (a CHAR(100));
10 CREATE TABLE ta2 (a CHAR(100));
11 CREATE TABLE ta3 (a CHAR(100));
12 CREATE TABLE autoinc_table (a INT PRIMARY KEY AUTO_INCREMENT);
13 CREATE TABLE data_table (a CHAR(100));
14 INSERT INTO data_table VALUES ('foo');
15 CREATE TABLE trigger_table_1 (a INT);
16 CREATE TABLE trigger_table_2 (a INT);
17 CREATE TABLE trigger_table_3 (a INT);
18 CREATE TABLE double_autoinc_table (a INT PRIMARY KEY AUTO_INCREMENT);
19 CREATE TRIGGER double_autoinc_trig
20 BEFORE INSERT ON double_autoinc_table FOR EACH ROW
21 BEGIN
22 INSERT INTO autoinc_table VALUES (NULL);
23 END|
24 CREATE FUNCTION multi_unsafe_func() RETURNS INT
25 BEGIN
26 INSERT INTO t0 VALUES(CONCAT(@@hostname, @@hostname));
27 INSERT INTO t0 VALUES(0);
28 INSERT INTO t0 VALUES(CONCAT(UUID(), @@hostname));
29 RETURN 1;
30 END|
31 CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
32
33 ==== Testing UUID() unsafeness ====
34
35 Invoking function func_retval_1 returning value from unsafe UUID() function.
36 CREATE FUNCTION func_retval_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); RETURN UUID(); END;
37 * binlog_format = STATEMENT: expect 1 warnings.
38 INSERT INTO t1 VALUES (func_retval_1());
39 Warnings:
40 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
41 include/assert.inc [There should be 1 warning(s)]
42 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
43 include/assert.inc [There should be 0 warning(s)]
44 include/assert.inc [Only two events should exist in the binary log]
45 * binlog_format = MIXED: expect row events in binlog and no warning.
46 Warnings:
47 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
48 include/assert.inc [Event should be a Table_map_log_event]
49 Warnings:
50 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
51 * Invoke statement so that return value is dicarded: expect no warning.
52 SELECT func_retval_1();
53
54 Invoking function func_retval_2 returning value from function func_retval_1 returning value from unsafe UUID() function.
55 CREATE FUNCTION func_retval_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); RETURN func_retval_1(); END;
56 * binlog_format = STATEMENT: expect 1 warnings.
57 INSERT INTO t2 VALUES (func_retval_2());
58 Warnings:
59 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
60 include/assert.inc [There should be 1 warning(s)]
61 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
62 include/assert.inc [There should be 0 warning(s)]
63 include/assert.inc [Only two events should exist in the binary log]
64 * binlog_format = MIXED: expect row events in binlog and no warning.
65 Warnings:
66 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
67 include/assert.inc [Event should be a Table_map_log_event]
68 Warnings:
69 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
70 * Invoke statement so that return value is dicarded: expect no warning.
71 SELECT func_retval_2();
72 DROP FUNCTION func_retval_2;
73
74 Invoking function func_sidef_2 invoking function func_retval_1 returning value from unsafe UUID() function.
75 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 VALUES (func_retval_1()); RETURN 0; END;
76 * binlog_format = STATEMENT: expect 1 warnings.
77 INSERT INTO t2 SELECT func_sidef_2();
78 Warnings:
79 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
80 include/assert.inc [There should be 1 warning(s)]
81 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
82 include/assert.inc [There should be 0 warning(s)]
83 include/assert.inc [Only two events should exist in the binary log]
84 * binlog_format = MIXED: expect row events in binlog and no warning.
85 Warnings:
86 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
87 include/assert.inc [Event should be a Table_map_log_event]
88 Warnings:
89 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
90 DROP FUNCTION func_sidef_2;
91
92 Invoking procedure proc_2 invoking function func_retval_1 returning value from unsafe UUID() function.
93 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 VALUES (func_retval_1()); INSERT INTO ta2 VALUES (47); END;
94 * binlog_format = STATEMENT: expect 1 warnings.
95 CALL proc_2();
96 Warnings:
97 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
98 include/assert.inc [There should be 1 warning(s)]
99 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
100 include/assert.inc [There should be 0 warning(s)]
101 include/assert.inc [Only two events should exist in the binary log]
102 * binlog_format = MIXED: expect row events in binlog and no warning.
103 Warnings:
104 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
105 include/assert.inc [Event should be a Table_map_log_event]
106 Warnings:
107 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
108 DROP PROCEDURE proc_2;
109
110 Invoking trigger trig_2 invoking function func_retval_1 returning value from unsafe UUID() function.
111 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 VALUES (func_retval_1()); END;
112 * binlog_format = STATEMENT: expect 1 warnings.
113 INSERT INTO trigger_table_2 VALUES (1);
114 Warnings:
115 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
116 include/assert.inc [There should be 1 warning(s)]
117 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
118 include/assert.inc [There should be 0 warning(s)]
119 include/assert.inc [Only two events should exist in the binary log]
120 * binlog_format = MIXED: expect row events in binlog and no warning.
121 Warnings:
122 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
123 include/assert.inc [Event should be a Table_map_log_event]
124 Warnings:
125 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
126 DROP TRIGGER trig_2;
127
128 Invoking view view_retval_2 returning value from function func_retval_1 returning value from unsafe UUID() function.
129 CREATE VIEW view_retval_2 AS SELECT func_retval_1();
130 * binlog_format = STATEMENT: expect 1 warnings.
131 INSERT INTO t2 SELECT * FROM view_retval_2;
132 Warnings:
133 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
134 include/assert.inc [There should be 1 warning(s)]
135 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
136 include/assert.inc [There should be 0 warning(s)]
137 include/assert.inc [Only two events should exist in the binary log]
138 * binlog_format = MIXED: expect row events in binlog and no warning.
139 Warnings:
140 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
141 include/assert.inc [Event should be a Table_map_log_event]
142 Warnings:
143 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
144 * Invoke statement so that return value is dicarded: expect no warning.
145 SELECT * FROM view_retval_2;
146 DROP VIEW view_retval_2;
147 DROP FUNCTION func_retval_1;
148
149 Invoking function func_sidef_1 invoking unsafe UUID() function.
150 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 VALUES (UUID()); RETURN 0; END;
151 * binlog_format = STATEMENT: expect 1 warnings.
152 INSERT INTO t1 SELECT func_sidef_1();
153 Warnings:
154 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
155 include/assert.inc [There should be 1 warning(s)]
156 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
157 include/assert.inc [There should be 0 warning(s)]
158 include/assert.inc [Only two events should exist in the binary log]
159 * binlog_format = MIXED: expect row events in binlog and no warning.
160 Warnings:
161 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
162 include/assert.inc [Event should be a Table_map_log_event]
163 Warnings:
164 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
165
166 Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe UUID() function.
167 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
168 * binlog_format = STATEMENT: expect 1 warnings.
169 INSERT INTO t2 SELECT func_sidef_2();
170 Warnings:
171 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
172 include/assert.inc [There should be 1 warning(s)]
173 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
174 include/assert.inc [There should be 0 warning(s)]
175 include/assert.inc [Only two events should exist in the binary log]
176 * binlog_format = MIXED: expect row events in binlog and no warning.
177 Warnings:
178 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
179 include/assert.inc [Event should be a Table_map_log_event]
180 Warnings:
181 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
182 DROP FUNCTION func_sidef_2;
183
184 Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe UUID() function.
185 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
186 * binlog_format = STATEMENT: expect 1 warnings.
187 CALL proc_2();
188 Warnings:
189 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
190 include/assert.inc [There should be 1 warning(s)]
191 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
192 include/assert.inc [There should be 0 warning(s)]
193 include/assert.inc [Only two events should exist in the binary log]
194 * binlog_format = MIXED: expect row events in binlog and no warning.
195 Warnings:
196 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
197 include/assert.inc [Event should be a Table_map_log_event]
198 Warnings:
199 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
200 DROP PROCEDURE proc_2;
201
202 Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe UUID() function.
203 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
204 * binlog_format = STATEMENT: expect 1 warnings.
205 INSERT INTO trigger_table_2 VALUES (1);
206 Warnings:
207 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
208 include/assert.inc [There should be 1 warning(s)]
209 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
210 include/assert.inc [There should be 0 warning(s)]
211 include/assert.inc [Only two events should exist in the binary log]
212 * binlog_format = MIXED: expect row events in binlog and no warning.
213 Warnings:
214 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
215 include/assert.inc [Event should be a Table_map_log_event]
216 Warnings:
217 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
218 DROP TRIGGER trig_2;
219
220 Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe UUID() function.
221 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
222 * binlog_format = STATEMENT: expect 1 warnings.
223 INSERT INTO t2 SELECT * FROM view_sidef_2;
224 Warnings:
225 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
226 include/assert.inc [There should be 1 warning(s)]
227 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
228 include/assert.inc [There should be 0 warning(s)]
229 include/assert.inc [Only two events should exist in the binary log]
230 * binlog_format = MIXED: expect row events in binlog and no warning.
231 Warnings:
232 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
233 include/assert.inc [Event should be a Table_map_log_event]
234 Warnings:
235 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
236 DROP VIEW view_sidef_2;
237 DROP FUNCTION func_sidef_1;
238
239 Invoking procedure proc_1 invoking unsafe UUID() function.
240 CREATE PROCEDURE proc_1() BEGIN INSERT INTO t0 VALUES (UUID()); INSERT INTO ta1 VALUES (47); END;
241 * binlog_format = STATEMENT: expect 1 warnings.
242 CALL proc_1();
243 Warnings:
244 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
245 include/assert.inc [There should be 1 warning(s)]
246 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
247 include/assert.inc [There should be 0 warning(s)]
248 include/assert.inc [Only two events should exist in the binary log]
249 * binlog_format = MIXED: expect row events in binlog and no warning.
250 Warnings:
251 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
252 include/assert.inc [Event should be a Table_map_log_event]
253 Warnings:
254 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
255
256 Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe UUID() function.
257 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
258 * binlog_format = STATEMENT: expect 1 warnings.
259 INSERT INTO t2 SELECT func_sidef_2();
260 Warnings:
261 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
262 include/assert.inc [There should be 1 warning(s)]
263 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
264 include/assert.inc [There should be 0 warning(s)]
265 include/assert.inc [Only two events should exist in the binary log]
266 * binlog_format = MIXED: expect row events in binlog and no warning.
267 Warnings:
268 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
269 include/assert.inc [Event should be a Table_map_log_event]
270 Warnings:
271 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
272 DROP FUNCTION func_sidef_2;
273
274 Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe UUID() function.
275 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
276 * binlog_format = STATEMENT: expect 1 warnings.
277 CALL proc_2();
278 Warnings:
279 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
280 include/assert.inc [There should be 1 warning(s)]
281 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
282 include/assert.inc [There should be 0 warning(s)]
283 include/assert.inc [Only two events should exist in the binary log]
284 * binlog_format = MIXED: expect row events in binlog and no warning.
285 Warnings:
286 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
287 include/assert.inc [Event should be a Table_map_log_event]
288 Warnings:
289 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
290 DROP PROCEDURE proc_2;
291
292 Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe UUID() function.
293 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
294 * binlog_format = STATEMENT: expect 1 warnings.
295 INSERT INTO trigger_table_2 VALUES (1);
296 Warnings:
297 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
298 include/assert.inc [There should be 1 warning(s)]
299 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
300 include/assert.inc [There should be 0 warning(s)]
301 include/assert.inc [Only two events should exist in the binary log]
302 * binlog_format = MIXED: expect row events in binlog and no warning.
303 Warnings:
304 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
305 include/assert.inc [Event should be a Table_map_log_event]
306 Warnings:
307 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
308 DROP TRIGGER trig_2;
309 DROP PROCEDURE proc_1;
310
311 Invoking trigger trig_1 invoking unsafe UUID() function.
312 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 VALUES (UUID()); END;
313 * binlog_format = STATEMENT: expect 1 warnings.
314 INSERT INTO trigger_table_1 VALUES (1);
315 Warnings:
316 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
317 include/assert.inc [There should be 1 warning(s)]
318 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
319 include/assert.inc [There should be 0 warning(s)]
320 include/assert.inc [Only two events should exist in the binary log]
321 * binlog_format = MIXED: expect row events in binlog and no warning.
322 Warnings:
323 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
324 include/assert.inc [Event should be a Table_map_log_event]
325 Warnings:
326 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
327
328 Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe UUID() function.
329 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
330 * binlog_format = STATEMENT: expect 1 warnings.
331 INSERT INTO t2 SELECT func_sidef_2();
332 Warnings:
333 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
334 include/assert.inc [There should be 1 warning(s)]
335 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
336 include/assert.inc [There should be 0 warning(s)]
337 include/assert.inc [Only two events should exist in the binary log]
338 * binlog_format = MIXED: expect row events in binlog and no warning.
339 Warnings:
340 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
341 include/assert.inc [Event should be a Table_map_log_event]
342 Warnings:
343 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
344 DROP FUNCTION func_sidef_2;
345
346 Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe UUID() function.
347 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
348 * binlog_format = STATEMENT: expect 1 warnings.
349 CALL proc_2();
350 Warnings:
351 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
352 include/assert.inc [There should be 1 warning(s)]
353 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
354 include/assert.inc [There should be 0 warning(s)]
355 include/assert.inc [Only two events should exist in the binary log]
356 * binlog_format = MIXED: expect row events in binlog and no warning.
357 Warnings:
358 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
359 include/assert.inc [Event should be a Table_map_log_event]
360 Warnings:
361 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
362 DROP PROCEDURE proc_2;
363
364 Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe UUID() function.
365 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
366 * binlog_format = STATEMENT: expect 1 warnings.
367 INSERT INTO trigger_table_2 VALUES (1);
368 Warnings:
369 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
370 include/assert.inc [There should be 1 warning(s)]
371 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
372 include/assert.inc [There should be 0 warning(s)]
373 include/assert.inc [Only two events should exist in the binary log]
374 * binlog_format = MIXED: expect row events in binlog and no warning.
375 Warnings:
376 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
377 include/assert.inc [Event should be a Table_map_log_event]
378 Warnings:
379 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
380 DROP TRIGGER trig_2;
381 DROP TRIGGER trig_1;
382
383 Invoking view view_retval_1 returning value from unsafe UUID() function.
384 CREATE VIEW view_retval_1 AS SELECT UUID();
385 * binlog_format = STATEMENT: expect 1 warnings.
386 INSERT INTO t1 SELECT * FROM view_retval_1;
387 Warnings:
388 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
389 include/assert.inc [There should be 1 warning(s)]
390 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
391 include/assert.inc [There should be 0 warning(s)]
392 include/assert.inc [Only two events should exist in the binary log]
393 * binlog_format = MIXED: expect row events in binlog and no warning.
394 Warnings:
395 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
396 include/assert.inc [Event should be a Table_map_log_event]
397 Warnings:
398 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
399 * Invoke statement so that return value is dicarded: expect no warning.
400 SELECT * FROM view_retval_1;
401
402 Invoking function func_sidef_2 invoking view view_retval_1 returning value from unsafe UUID() function.
403 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_retval_1; RETURN 0; END;
404 * binlog_format = STATEMENT: expect 1 warnings.
405 INSERT INTO t2 SELECT func_sidef_2();
406 Warnings:
407 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
408 include/assert.inc [There should be 1 warning(s)]
409 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
410 include/assert.inc [There should be 0 warning(s)]
411 include/assert.inc [Only two events should exist in the binary log]
412 * binlog_format = MIXED: expect row events in binlog and no warning.
413 Warnings:
414 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
415 include/assert.inc [Event should be a Table_map_log_event]
416 Warnings:
417 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
418 DROP FUNCTION func_sidef_2;
419
420 Invoking procedure proc_2 invoking view view_retval_1 returning value from unsafe UUID() function.
421 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT * FROM view_retval_1; INSERT INTO ta2 VALUES (47); END;
422 * binlog_format = STATEMENT: expect 1 warnings.
423 CALL proc_2();
424 Warnings:
425 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
426 include/assert.inc [There should be 1 warning(s)]
427 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
428 include/assert.inc [There should be 0 warning(s)]
429 include/assert.inc [Only two events should exist in the binary log]
430 * binlog_format = MIXED: expect row events in binlog and no warning.
431 Warnings:
432 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
433 include/assert.inc [Event should be a Table_map_log_event]
434 Warnings:
435 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
436 DROP PROCEDURE proc_2;
437
438 Invoking trigger trig_2 invoking view view_retval_1 returning value from unsafe UUID() function.
439 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_retval_1; END;
440 * binlog_format = STATEMENT: expect 1 warnings.
441 INSERT INTO trigger_table_2 VALUES (1);
442 Warnings:
443 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
444 include/assert.inc [There should be 1 warning(s)]
445 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
446 include/assert.inc [There should be 0 warning(s)]
447 include/assert.inc [Only two events should exist in the binary log]
448 * binlog_format = MIXED: expect row events in binlog and no warning.
449 Warnings:
450 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
451 include/assert.inc [Event should be a Table_map_log_event]
452 Warnings:
453 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
454 DROP TRIGGER trig_2;
455
456 Invoking view view_retval_2 returning value from view view_retval_1 returning value from unsafe UUID() function.
457 CREATE VIEW view_retval_2 AS SELECT * FROM view_retval_1;
458 * binlog_format = STATEMENT: expect 1 warnings.
459 INSERT INTO t2 SELECT * FROM view_retval_2;
460 Warnings:
461 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
462 include/assert.inc [There should be 1 warning(s)]
463 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
464 include/assert.inc [There should be 0 warning(s)]
465 include/assert.inc [Only two events should exist in the binary log]
466 * binlog_format = MIXED: expect row events in binlog and no warning.
467 Warnings:
468 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
469 include/assert.inc [Event should be a Table_map_log_event]
470 Warnings:
471 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
472 * Invoke statement so that return value is dicarded: expect no warning.
473 SELECT * FROM view_retval_2;
474 DROP VIEW view_retval_2;
475 DROP VIEW view_retval_1;
476
477 Invoking prepared statement prep_1 invoking unsafe UUID() function.
478 PREPARE prep_1 FROM "INSERT INTO t0 VALUES (UUID())";
479 * binlog_format = STATEMENT: expect 1 warnings.
480 EXECUTE prep_1;
481 Warnings:
482 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
483 include/assert.inc [There should be 1 warning(s)]
484 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
485 include/assert.inc [There should be 0 warning(s)]
486 include/assert.inc [Only two events should exist in the binary log]
487 * binlog_format = MIXED: expect row events in binlog and no warning.
488 Warnings:
489 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
490 include/assert.inc [Event should be a Table_map_log_event]
491 Warnings:
492 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
493 DROP PREPARE prep_1;
494
495 ==== Testing @@hostname unsafeness ====
496
497 Invoking function func_retval_1 returning value from unsafe @@hostname variable.
498 CREATE FUNCTION func_retval_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); RETURN @@hostname; END;
499 * binlog_format = STATEMENT: expect 1 warnings.
500 INSERT INTO t1 VALUES (func_retval_1());
501 Warnings:
502 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
503 include/assert.inc [There should be 1 warning(s)]
504 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
505 include/assert.inc [There should be 0 warning(s)]
506 include/assert.inc [Only two events should exist in the binary log]
507 * binlog_format = MIXED: expect row events in binlog and no warning.
508 Warnings:
509 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
510 include/assert.inc [Event should be a Table_map_log_event]
511 Warnings:
512 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
513 * Invoke statement so that return value is dicarded: expect no warning.
514 SELECT func_retval_1();
515
516 Invoking function func_retval_2 returning value from function func_retval_1 returning value from unsafe @@hostname variable.
517 CREATE FUNCTION func_retval_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); RETURN func_retval_1(); END;
518 * binlog_format = STATEMENT: expect 1 warnings.
519 INSERT INTO t2 VALUES (func_retval_2());
520 Warnings:
521 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
522 include/assert.inc [There should be 1 warning(s)]
523 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
524 include/assert.inc [There should be 0 warning(s)]
525 include/assert.inc [Only two events should exist in the binary log]
526 * binlog_format = MIXED: expect row events in binlog and no warning.
527 Warnings:
528 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
529 include/assert.inc [Event should be a Table_map_log_event]
530 Warnings:
531 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
532 * Invoke statement so that return value is dicarded: expect no warning.
533 SELECT func_retval_2();
534 DROP FUNCTION func_retval_2;
535
536 Invoking function func_sidef_2 invoking function func_retval_1 returning value from unsafe @@hostname variable.
537 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 VALUES (func_retval_1()); RETURN 0; END;
538 * binlog_format = STATEMENT: expect 1 warnings.
539 INSERT INTO t2 SELECT func_sidef_2();
540 Warnings:
541 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
542 include/assert.inc [There should be 1 warning(s)]
543 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
544 include/assert.inc [There should be 0 warning(s)]
545 include/assert.inc [Only two events should exist in the binary log]
546 * binlog_format = MIXED: expect row events in binlog and no warning.
547 Warnings:
548 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
549 include/assert.inc [Event should be a Table_map_log_event]
550 Warnings:
551 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
552 DROP FUNCTION func_sidef_2;
553
554 Invoking procedure proc_2 invoking function func_retval_1 returning value from unsafe @@hostname variable.
555 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 VALUES (func_retval_1()); INSERT INTO ta2 VALUES (47); END;
556 * binlog_format = STATEMENT: expect 1 warnings.
557 CALL proc_2();
558 Warnings:
559 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
560 include/assert.inc [There should be 1 warning(s)]
561 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
562 include/assert.inc [There should be 0 warning(s)]
563 include/assert.inc [Only two events should exist in the binary log]
564 * binlog_format = MIXED: expect row events in binlog and no warning.
565 Warnings:
566 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
567 include/assert.inc [Event should be a Table_map_log_event]
568 Warnings:
569 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
570 DROP PROCEDURE proc_2;
571
572 Invoking trigger trig_2 invoking function func_retval_1 returning value from unsafe @@hostname variable.
573 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 VALUES (func_retval_1()); END;
574 * binlog_format = STATEMENT: expect 1 warnings.
575 INSERT INTO trigger_table_2 VALUES (1);
576 Warnings:
577 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
578 include/assert.inc [There should be 1 warning(s)]
579 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
580 include/assert.inc [There should be 0 warning(s)]
581 include/assert.inc [Only two events should exist in the binary log]
582 * binlog_format = MIXED: expect row events in binlog and no warning.
583 Warnings:
584 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
585 include/assert.inc [Event should be a Table_map_log_event]
586 Warnings:
587 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
588 DROP TRIGGER trig_2;
589
590 Invoking view view_retval_2 returning value from function func_retval_1 returning value from unsafe @@hostname variable.
591 CREATE VIEW view_retval_2 AS SELECT func_retval_1();
592 * binlog_format = STATEMENT: expect 1 warnings.
593 INSERT INTO t2 SELECT * FROM view_retval_2;
594 Warnings:
595 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
596 include/assert.inc [There should be 1 warning(s)]
597 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
598 include/assert.inc [There should be 0 warning(s)]
599 include/assert.inc [Only two events should exist in the binary log]
600 * binlog_format = MIXED: expect row events in binlog and no warning.
601 Warnings:
602 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
603 include/assert.inc [Event should be a Table_map_log_event]
604 Warnings:
605 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
606 * Invoke statement so that return value is dicarded: expect no warning.
607 SELECT * FROM view_retval_2;
608 DROP VIEW view_retval_2;
609 DROP FUNCTION func_retval_1;
610
611 Invoking function func_sidef_1 invoking unsafe @@hostname variable.
612 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 VALUES (@@hostname); RETURN 0; END;
613 * binlog_format = STATEMENT: expect 1 warnings.
614 INSERT INTO t1 SELECT func_sidef_1();
615 Warnings:
616 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
617 include/assert.inc [There should be 1 warning(s)]
618 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
619 include/assert.inc [There should be 0 warning(s)]
620 include/assert.inc [Only two events should exist in the binary log]
621 * binlog_format = MIXED: expect row events in binlog and no warning.
622 Warnings:
623 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
624 include/assert.inc [Event should be a Table_map_log_event]
625 Warnings:
626 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
627
628 Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe @@hostname variable.
629 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
630 * binlog_format = STATEMENT: expect 1 warnings.
631 INSERT INTO t2 SELECT func_sidef_2();
632 Warnings:
633 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
634 include/assert.inc [There should be 1 warning(s)]
635 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
636 include/assert.inc [There should be 0 warning(s)]
637 include/assert.inc [Only two events should exist in the binary log]
638 * binlog_format = MIXED: expect row events in binlog and no warning.
639 Warnings:
640 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
641 include/assert.inc [Event should be a Table_map_log_event]
642 Warnings:
643 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
644 DROP FUNCTION func_sidef_2;
645
646 Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe @@hostname variable.
647 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
648 * binlog_format = STATEMENT: expect 1 warnings.
649 CALL proc_2();
650 Warnings:
651 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
652 include/assert.inc [There should be 1 warning(s)]
653 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
654 include/assert.inc [There should be 0 warning(s)]
655 include/assert.inc [Only two events should exist in the binary log]
656 * binlog_format = MIXED: expect row events in binlog and no warning.
657 Warnings:
658 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
659 include/assert.inc [Event should be a Table_map_log_event]
660 Warnings:
661 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
662 DROP PROCEDURE proc_2;
663
664 Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe @@hostname variable.
665 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
666 * binlog_format = STATEMENT: expect 1 warnings.
667 INSERT INTO trigger_table_2 VALUES (1);
668 Warnings:
669 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
670 include/assert.inc [There should be 1 warning(s)]
671 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
672 include/assert.inc [There should be 0 warning(s)]
673 include/assert.inc [Only two events should exist in the binary log]
674 * binlog_format = MIXED: expect row events in binlog and no warning.
675 Warnings:
676 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
677 include/assert.inc [Event should be a Table_map_log_event]
678 Warnings:
679 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
680 DROP TRIGGER trig_2;
681
682 Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe @@hostname variable.
683 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
684 * binlog_format = STATEMENT: expect 1 warnings.
685 INSERT INTO t2 SELECT * FROM view_sidef_2;
686 Warnings:
687 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
688 include/assert.inc [There should be 1 warning(s)]
689 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
690 include/assert.inc [There should be 0 warning(s)]
691 include/assert.inc [Only two events should exist in the binary log]
692 * binlog_format = MIXED: expect row events in binlog and no warning.
693 Warnings:
694 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
695 include/assert.inc [Event should be a Table_map_log_event]
696 Warnings:
697 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
698 DROP VIEW view_sidef_2;
699 DROP FUNCTION func_sidef_1;
700
701 Invoking procedure proc_1 invoking unsafe @@hostname variable.
702 CREATE PROCEDURE proc_1() BEGIN INSERT INTO t0 VALUES (@@hostname); INSERT INTO ta1 VALUES (47); END;
703 * binlog_format = STATEMENT: expect 1 warnings.
704 CALL proc_1();
705 Warnings:
706 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
707 include/assert.inc [There should be 1 warning(s)]
708 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
709 include/assert.inc [There should be 0 warning(s)]
710 include/assert.inc [Only two events should exist in the binary log]
711 * binlog_format = MIXED: expect row events in binlog and no warning.
712 Warnings:
713 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
714 include/assert.inc [Event should be a Table_map_log_event]
715 Warnings:
716 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
717
718 Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe @@hostname variable.
719 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
720 * binlog_format = STATEMENT: expect 1 warnings.
721 INSERT INTO t2 SELECT func_sidef_2();
722 Warnings:
723 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
724 include/assert.inc [There should be 1 warning(s)]
725 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
726 include/assert.inc [There should be 0 warning(s)]
727 include/assert.inc [Only two events should exist in the binary log]
728 * binlog_format = MIXED: expect row events in binlog and no warning.
729 Warnings:
730 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
731 include/assert.inc [Event should be a Table_map_log_event]
732 Warnings:
733 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
734 DROP FUNCTION func_sidef_2;
735
736 Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe @@hostname variable.
737 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
738 * binlog_format = STATEMENT: expect 1 warnings.
739 CALL proc_2();
740 Warnings:
741 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
742 include/assert.inc [There should be 1 warning(s)]
743 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
744 include/assert.inc [There should be 0 warning(s)]
745 include/assert.inc [Only two events should exist in the binary log]
746 * binlog_format = MIXED: expect row events in binlog and no warning.
747 Warnings:
748 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
749 include/assert.inc [Event should be a Table_map_log_event]
750 Warnings:
751 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
752 DROP PROCEDURE proc_2;
753
754 Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe @@hostname variable.
755 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
756 * binlog_format = STATEMENT: expect 1 warnings.
757 INSERT INTO trigger_table_2 VALUES (1);
758 Warnings:
759 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
760 include/assert.inc [There should be 1 warning(s)]
761 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
762 include/assert.inc [There should be 0 warning(s)]
763 include/assert.inc [Only two events should exist in the binary log]
764 * binlog_format = MIXED: expect row events in binlog and no warning.
765 Warnings:
766 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
767 include/assert.inc [Event should be a Table_map_log_event]
768 Warnings:
769 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
770 DROP TRIGGER trig_2;
771 DROP PROCEDURE proc_1;
772
773 Invoking trigger trig_1 invoking unsafe @@hostname variable.
774 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 VALUES (@@hostname); END;
775 * binlog_format = STATEMENT: expect 1 warnings.
776 INSERT INTO trigger_table_1 VALUES (1);
777 Warnings:
778 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
779 include/assert.inc [There should be 1 warning(s)]
780 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
781 include/assert.inc [There should be 0 warning(s)]
782 include/assert.inc [Only two events should exist in the binary log]
783 * binlog_format = MIXED: expect row events in binlog and no warning.
784 Warnings:
785 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
786 include/assert.inc [Event should be a Table_map_log_event]
787 Warnings:
788 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
789
790 Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe @@hostname variable.
791 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
792 * binlog_format = STATEMENT: expect 1 warnings.
793 INSERT INTO t2 SELECT func_sidef_2();
794 Warnings:
795 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
796 include/assert.inc [There should be 1 warning(s)]
797 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
798 include/assert.inc [There should be 0 warning(s)]
799 include/assert.inc [Only two events should exist in the binary log]
800 * binlog_format = MIXED: expect row events in binlog and no warning.
801 Warnings:
802 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
803 include/assert.inc [Event should be a Table_map_log_event]
804 Warnings:
805 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
806 DROP FUNCTION func_sidef_2;
807
808 Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe @@hostname variable.
809 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
810 * binlog_format = STATEMENT: expect 1 warnings.
811 CALL proc_2();
812 Warnings:
813 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
814 include/assert.inc [There should be 1 warning(s)]
815 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
816 include/assert.inc [There should be 0 warning(s)]
817 include/assert.inc [Only two events should exist in the binary log]
818 * binlog_format = MIXED: expect row events in binlog and no warning.
819 Warnings:
820 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
821 include/assert.inc [Event should be a Table_map_log_event]
822 Warnings:
823 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
824 DROP PROCEDURE proc_2;
825
826 Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe @@hostname variable.
827 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
828 * binlog_format = STATEMENT: expect 1 warnings.
829 INSERT INTO trigger_table_2 VALUES (1);
830 Warnings:
831 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
832 include/assert.inc [There should be 1 warning(s)]
833 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
834 include/assert.inc [There should be 0 warning(s)]
835 include/assert.inc [Only two events should exist in the binary log]
836 * binlog_format = MIXED: expect row events in binlog and no warning.
837 Warnings:
838 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
839 include/assert.inc [Event should be a Table_map_log_event]
840 Warnings:
841 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
842 DROP TRIGGER trig_2;
843 DROP TRIGGER trig_1;
844
845 Invoking prepared statement prep_1 invoking unsafe @@hostname variable.
846 PREPARE prep_1 FROM "INSERT INTO t0 VALUES (@@hostname)";
847 * binlog_format = STATEMENT: expect 1 warnings.
848 EXECUTE prep_1;
849 Warnings:
850 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
851 include/assert.inc [There should be 1 warning(s)]
852 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
853 include/assert.inc [There should be 0 warning(s)]
854 include/assert.inc [Only two events should exist in the binary log]
855 * binlog_format = MIXED: expect row events in binlog and no warning.
856 Warnings:
857 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
858 include/assert.inc [Event should be a Table_map_log_event]
859 Warnings:
860 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
861 DROP PREPARE prep_1;
862
863 ==== Testing SELECT...LIMIT unsafeness ====
864
865 Invoking function func_sidef_1 invoking unsafe SELECT...LIMIT statement.
866 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 SELECT * FROM data_table LIMIT 1; RETURN 0; END;
867 * binlog_format = STATEMENT: expect 1 warnings.
868 INSERT INTO t1 SELECT func_sidef_1();
869 Warnings:
870 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
871 include/assert.inc [There should be 1 warning(s)]
872 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
873 include/assert.inc [There should be 0 warning(s)]
874 include/assert.inc [Only two events should exist in the binary log]
875 * binlog_format = MIXED: expect row events in binlog and no warning.
876 Warnings:
877 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
878 include/assert.inc [Event should be a Table_map_log_event]
879 Warnings:
880 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
881
882 Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe SELECT...LIMIT statement.
883 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
884 * binlog_format = STATEMENT: expect 1 warnings.
885 INSERT INTO t2 SELECT func_sidef_2();
886 Warnings:
887 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
888 include/assert.inc [There should be 1 warning(s)]
889 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
890 include/assert.inc [There should be 0 warning(s)]
891 include/assert.inc [Only two events should exist in the binary log]
892 * binlog_format = MIXED: expect row events in binlog and no warning.
893 Warnings:
894 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
895 include/assert.inc [Event should be a Table_map_log_event]
896 Warnings:
897 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
898 DROP FUNCTION func_sidef_2;
899
900 Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe SELECT...LIMIT statement.
901 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
902 * binlog_format = STATEMENT: expect 1 warnings.
903 CALL proc_2();
904 Warnings:
905 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
906 include/assert.inc [There should be 1 warning(s)]
907 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
908 include/assert.inc [There should be 0 warning(s)]
909 include/assert.inc [Only two events should exist in the binary log]
910 * binlog_format = MIXED: expect row events in binlog and no warning.
911 Warnings:
912 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
913 include/assert.inc [Event should be a Table_map_log_event]
914 Warnings:
915 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
916 DROP PROCEDURE proc_2;
917
918 Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe SELECT...LIMIT statement.
919 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
920 * binlog_format = STATEMENT: expect 1 warnings.
921 INSERT INTO trigger_table_2 VALUES (1);
922 Warnings:
923 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
924 include/assert.inc [There should be 1 warning(s)]
925 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
926 include/assert.inc [There should be 0 warning(s)]
927 include/assert.inc [Only two events should exist in the binary log]
928 * binlog_format = MIXED: expect row events in binlog and no warning.
929 Warnings:
930 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
931 include/assert.inc [Event should be a Table_map_log_event]
932 Warnings:
933 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
934 DROP TRIGGER trig_2;
935
936 Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe SELECT...LIMIT statement.
937 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
938 * binlog_format = STATEMENT: expect 1 warnings.
939 INSERT INTO t2 SELECT * FROM view_sidef_2;
940 Warnings:
941 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
942 include/assert.inc [There should be 1 warning(s)]
943 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
944 include/assert.inc [There should be 0 warning(s)]
945 include/assert.inc [Only two events should exist in the binary log]
946 * binlog_format = MIXED: expect row events in binlog and no warning.
947 Warnings:
948 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
949 include/assert.inc [Event should be a Table_map_log_event]
950 Warnings:
951 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
952 DROP VIEW view_sidef_2;
953 DROP FUNCTION func_sidef_1;
954
955 Invoking procedure proc_1 invoking unsafe SELECT...LIMIT statement.
956 CREATE PROCEDURE proc_1() BEGIN INSERT INTO t0 SELECT * FROM data_table LIMIT 1; INSERT INTO ta1 VALUES (47); END;
957 * binlog_format = STATEMENT: expect 1 warnings.
958 CALL proc_1();
959 Warnings:
960 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
961 include/assert.inc [There should be 1 warning(s)]
962 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
963 include/assert.inc [There should be 0 warning(s)]
964 include/assert.inc [Only two events should exist in the binary log]
965 * binlog_format = MIXED: expect row events in binlog and no warning.
966 Warnings:
967 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
968 include/assert.inc [Event should be a Table_map_log_event]
969 Warnings:
970 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
971
972 Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe SELECT...LIMIT statement.
973 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
974 * binlog_format = STATEMENT: expect 1 warnings.
975 INSERT INTO t2 SELECT func_sidef_2();
976 Warnings:
977 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
978 include/assert.inc [There should be 1 warning(s)]
979 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
980 include/assert.inc [There should be 0 warning(s)]
981 include/assert.inc [Only two events should exist in the binary log]
982 * binlog_format = MIXED: expect row events in binlog and no warning.
983 Warnings:
984 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
985 include/assert.inc [Event should be a Table_map_log_event]
986 Warnings:
987 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
988 DROP FUNCTION func_sidef_2;
989
990 Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe SELECT...LIMIT statement.
991 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
992 * binlog_format = STATEMENT: expect 1 warnings.
993 CALL proc_2();
994 Warnings:
995 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
996 include/assert.inc [There should be 1 warning(s)]
997 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
998 include/assert.inc [There should be 0 warning(s)]
999 include/assert.inc [Only two events should exist in the binary log]
1000 * binlog_format = MIXED: expect row events in binlog and no warning.
1001 Warnings:
1002 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1003 include/assert.inc [Event should be a Table_map_log_event]
1004 Warnings:
1005 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1006 DROP PROCEDURE proc_2;
1007
1008 Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe SELECT...LIMIT statement.
1009 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
1010 * binlog_format = STATEMENT: expect 1 warnings.
1011 INSERT INTO trigger_table_2 VALUES (1);
1012 Warnings:
1013 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1014 include/assert.inc [There should be 1 warning(s)]
1015 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1016 include/assert.inc [There should be 0 warning(s)]
1017 include/assert.inc [Only two events should exist in the binary log]
1018 * binlog_format = MIXED: expect row events in binlog and no warning.
1019 Warnings:
1020 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1021 include/assert.inc [Event should be a Table_map_log_event]
1022 Warnings:
1023 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1024 DROP TRIGGER trig_2;
1025 DROP PROCEDURE proc_1;
1026
1027 Invoking trigger trig_1 invoking unsafe SELECT...LIMIT statement.
1028 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 SELECT * FROM data_table LIMIT 1; END;
1029 * binlog_format = STATEMENT: expect 1 warnings.
1030 INSERT INTO trigger_table_1 VALUES (1);
1031 Warnings:
1032 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1033 include/assert.inc [There should be 1 warning(s)]
1034 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1035 include/assert.inc [There should be 0 warning(s)]
1036 include/assert.inc [Only two events should exist in the binary log]
1037 * binlog_format = MIXED: expect row events in binlog and no warning.
1038 Warnings:
1039 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1040 include/assert.inc [Event should be a Table_map_log_event]
1041 Warnings:
1042 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1043
1044 Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe SELECT...LIMIT statement.
1045 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
1046 * binlog_format = STATEMENT: expect 1 warnings.
1047 INSERT INTO t2 SELECT func_sidef_2();
1048 Warnings:
1049 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1050 include/assert.inc [There should be 1 warning(s)]
1051 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1052 include/assert.inc [There should be 0 warning(s)]
1053 include/assert.inc [Only two events should exist in the binary log]
1054 * binlog_format = MIXED: expect row events in binlog and no warning.
1055 Warnings:
1056 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1057 include/assert.inc [Event should be a Table_map_log_event]
1058 Warnings:
1059 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1060 DROP FUNCTION func_sidef_2;
1061
1062 Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe SELECT...LIMIT statement.
1063 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
1064 * binlog_format = STATEMENT: expect 1 warnings.
1065 CALL proc_2();
1066 Warnings:
1067 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1068 include/assert.inc [There should be 1 warning(s)]
1069 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1070 include/assert.inc [There should be 0 warning(s)]
1071 include/assert.inc [Only two events should exist in the binary log]
1072 * binlog_format = MIXED: expect row events in binlog and no warning.
1073 Warnings:
1074 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1075 include/assert.inc [Event should be a Table_map_log_event]
1076 Warnings:
1077 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1078 DROP PROCEDURE proc_2;
1079
1080 Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe SELECT...LIMIT statement.
1081 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
1082 * binlog_format = STATEMENT: expect 1 warnings.
1083 INSERT INTO trigger_table_2 VALUES (1);
1084 Warnings:
1085 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1086 include/assert.inc [There should be 1 warning(s)]
1087 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1088 include/assert.inc [There should be 0 warning(s)]
1089 include/assert.inc [Only two events should exist in the binary log]
1090 * binlog_format = MIXED: expect row events in binlog and no warning.
1091 Warnings:
1092 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1093 include/assert.inc [Event should be a Table_map_log_event]
1094 Warnings:
1095 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1096 DROP TRIGGER trig_2;
1097 DROP TRIGGER trig_1;
1098
1099 Invoking view view_retval_1 returning value from unsafe SELECT...LIMIT statement.
1100 CREATE VIEW view_retval_1 AS SELECT * FROM data_table LIMIT 1;
1101 * binlog_format = STATEMENT: expect 1 warnings.
1102 INSERT INTO t1 SELECT * FROM view_retval_1;
1103 Warnings:
1104 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1105 include/assert.inc [There should be 1 warning(s)]
1106 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1107 include/assert.inc [There should be 0 warning(s)]
1108 include/assert.inc [Only two events should exist in the binary log]
1109 * binlog_format = MIXED: expect row events in binlog and no warning.
1110 Warnings:
1111 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1112 include/assert.inc [Event should be a Table_map_log_event]
1113 Warnings:
1114 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1115 * Invoke statement so that return value is dicarded: expect no warning.
1116 SELECT * FROM view_retval_1;
1117
1118 Invoking function func_sidef_2 invoking view view_retval_1 returning value from unsafe SELECT...LIMIT statement.
1119 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_retval_1; RETURN 0; END;
1120 * binlog_format = STATEMENT: expect 1 warnings.
1121 INSERT INTO t2 SELECT func_sidef_2();
1122 Warnings:
1123 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1124 include/assert.inc [There should be 1 warning(s)]
1125 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1126 include/assert.inc [There should be 0 warning(s)]
1127 include/assert.inc [Only two events should exist in the binary log]
1128 * binlog_format = MIXED: expect row events in binlog and no warning.
1129 Warnings:
1130 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1131 include/assert.inc [Event should be a Table_map_log_event]
1132 Warnings:
1133 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1134 DROP FUNCTION func_sidef_2;
1135
1136 Invoking procedure proc_2 invoking view view_retval_1 returning value from unsafe SELECT...LIMIT statement.
1137 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT * FROM view_retval_1; INSERT INTO ta2 VALUES (47); END;
1138 * binlog_format = STATEMENT: expect 1 warnings.
1139 CALL proc_2();
1140 Warnings:
1141 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1142 include/assert.inc [There should be 1 warning(s)]
1143 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1144 include/assert.inc [There should be 0 warning(s)]
1145 include/assert.inc [Only two events should exist in the binary log]
1146 * binlog_format = MIXED: expect row events in binlog and no warning.
1147 Warnings:
1148 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1149 include/assert.inc [Event should be a Table_map_log_event]
1150 Warnings:
1151 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1152 DROP PROCEDURE proc_2;
1153
1154 Invoking trigger trig_2 invoking view view_retval_1 returning value from unsafe SELECT...LIMIT statement.
1155 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_retval_1; END;
1156 * binlog_format = STATEMENT: expect 1 warnings.
1157 INSERT INTO trigger_table_2 VALUES (1);
1158 Warnings:
1159 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1160 include/assert.inc [There should be 1 warning(s)]
1161 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1162 include/assert.inc [There should be 0 warning(s)]
1163 include/assert.inc [Only two events should exist in the binary log]
1164 * binlog_format = MIXED: expect row events in binlog and no warning.
1165 Warnings:
1166 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1167 include/assert.inc [Event should be a Table_map_log_event]
1168 Warnings:
1169 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1170 DROP TRIGGER trig_2;
1171
1172 Invoking view view_retval_2 returning value from view view_retval_1 returning value from unsafe SELECT...LIMIT statement.
1173 CREATE VIEW view_retval_2 AS SELECT * FROM view_retval_1;
1174 * binlog_format = STATEMENT: expect 1 warnings.
1175 INSERT INTO t2 SELECT * FROM view_retval_2;
1176 Warnings:
1177 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1178 include/assert.inc [There should be 1 warning(s)]
1179 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1180 include/assert.inc [There should be 0 warning(s)]
1181 include/assert.inc [Only two events should exist in the binary log]
1182 * binlog_format = MIXED: expect row events in binlog and no warning.
1183 Warnings:
1184 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1185 include/assert.inc [Event should be a Table_map_log_event]
1186 Warnings:
1187 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1188 * Invoke statement so that return value is dicarded: expect no warning.
1189 SELECT * FROM view_retval_2;
1190 DROP VIEW view_retval_2;
1191 DROP VIEW view_retval_1;
1192
1193 Invoking prepared statement prep_1 invoking unsafe SELECT...LIMIT statement.
1194 PREPARE prep_1 FROM "INSERT INTO t0 SELECT * FROM data_table LIMIT 1";
1195 * binlog_format = STATEMENT: expect 1 warnings.
1196 EXECUTE prep_1;
1197 Warnings:
1198 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1199 include/assert.inc [There should be 1 warning(s)]
1200 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1201 include/assert.inc [There should be 0 warning(s)]
1202 include/assert.inc [Only two events should exist in the binary log]
1203 * binlog_format = MIXED: expect row events in binlog and no warning.
1204 Warnings:
1205 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1206 include/assert.inc [Event should be a Table_map_log_event]
1207 Warnings:
1208 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1209 DROP PREPARE prep_1;
1210
1211 ==== Testing unsafeness of insert of two autoinc values ====
1212
1213 Invoking function func_sidef_1 invoking unsafe update of two autoinc columns.
1214 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO double_autoinc_table VALUES (NULL); RETURN 0; END;
1215 * binlog_format = STATEMENT: expect 1 warnings.
1216 INSERT INTO t1 SELECT func_sidef_1();
1217 Warnings:
1218 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1219 include/assert.inc [There should be 1 warning(s)]
1220 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1221 include/assert.inc [There should be 0 warning(s)]
1222 include/assert.inc [Only two events should exist in the binary log]
1223 * binlog_format = MIXED: expect row events in binlog and no warning.
1224 Warnings:
1225 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1226 include/assert.inc [Event should be a Table_map_log_event]
1227 Warnings:
1228 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1229
1230 Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe update of two autoinc columns.
1231 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
1232 * binlog_format = STATEMENT: expect 1 warnings.
1233 INSERT INTO t2 SELECT func_sidef_2();
1234 Warnings:
1235 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1236 include/assert.inc [There should be 1 warning(s)]
1237 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1238 include/assert.inc [There should be 0 warning(s)]
1239 include/assert.inc [Only two events should exist in the binary log]
1240 * binlog_format = MIXED: expect row events in binlog and no warning.
1241 Warnings:
1242 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1243 include/assert.inc [Event should be a Table_map_log_event]
1244 Warnings:
1245 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1246 DROP FUNCTION func_sidef_2;
1247
1248 Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe update of two autoinc columns.
1249 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
1250 * binlog_format = STATEMENT: expect 1 warnings.
1251 CALL proc_2();
1252 Warnings:
1253 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1254 include/assert.inc [There should be 1 warning(s)]
1255 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1256 include/assert.inc [There should be 0 warning(s)]
1257 include/assert.inc [Only two events should exist in the binary log]
1258 * binlog_format = MIXED: expect row events in binlog and no warning.
1259 Warnings:
1260 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1261 include/assert.inc [Event should be a Table_map_log_event]
1262 Warnings:
1263 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1264 DROP PROCEDURE proc_2;
1265
1266 Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe update of two autoinc columns.
1267 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
1268 * binlog_format = STATEMENT: expect 1 warnings.
1269 INSERT INTO trigger_table_2 VALUES (1);
1270 Warnings:
1271 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1272 include/assert.inc [There should be 1 warning(s)]
1273 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1274 include/assert.inc [There should be 0 warning(s)]
1275 include/assert.inc [Only two events should exist in the binary log]
1276 * binlog_format = MIXED: expect row events in binlog and no warning.
1277 Warnings:
1278 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1279 include/assert.inc [Event should be a Table_map_log_event]
1280 Warnings:
1281 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1282 DROP TRIGGER trig_2;
1283
1284 Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe update of two autoinc columns.
1285 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
1286 * binlog_format = STATEMENT: expect 1 warnings.
1287 INSERT INTO t2 SELECT * FROM view_sidef_2;
1288 Warnings:
1289 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1290 include/assert.inc [There should be 1 warning(s)]
1291 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1292 include/assert.inc [There should be 0 warning(s)]
1293 include/assert.inc [Only two events should exist in the binary log]
1294 * binlog_format = MIXED: expect row events in binlog and no warning.
1295 Warnings:
1296 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1297 include/assert.inc [Event should be a Table_map_log_event]
1298 Warnings:
1299 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1300 DROP VIEW view_sidef_2;
1301 DROP FUNCTION func_sidef_1;
1302
1303 Invoking procedure proc_1 invoking unsafe update of two autoinc columns.
1304 CREATE PROCEDURE proc_1() BEGIN INSERT INTO double_autoinc_table VALUES (NULL); INSERT INTO ta1 VALUES (47); END;
1305 * binlog_format = STATEMENT: expect 1 warnings.
1306 CALL proc_1();
1307 Warnings:
1308 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1309 include/assert.inc [There should be 1 warning(s)]
1310 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1311 include/assert.inc [There should be 0 warning(s)]
1312 include/assert.inc [Only two events should exist in the binary log]
1313 * binlog_format = MIXED: expect row events in binlog and no warning.
1314 Warnings:
1315 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1316 include/assert.inc [Event should be a Table_map_log_event]
1317 Warnings:
1318 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1319
1320 Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe update of two autoinc columns.
1321 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
1322 * binlog_format = STATEMENT: expect 1 warnings.
1323 INSERT INTO t2 SELECT func_sidef_2();
1324 Warnings:
1325 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1326 include/assert.inc [There should be 1 warning(s)]
1327 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1328 include/assert.inc [There should be 0 warning(s)]
1329 include/assert.inc [Only two events should exist in the binary log]
1330 * binlog_format = MIXED: expect row events in binlog and no warning.
1331 Warnings:
1332 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1333 include/assert.inc [Event should be a Table_map_log_event]
1334 Warnings:
1335 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1336 DROP FUNCTION func_sidef_2;
1337
1338 Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe update of two autoinc columns.
1339 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
1340 * binlog_format = STATEMENT: expect 1 warnings.
1341 CALL proc_2();
1342 Warnings:
1343 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1344 include/assert.inc [There should be 1 warning(s)]
1345 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1346 include/assert.inc [There should be 0 warning(s)]
1347 include/assert.inc [Only two events should exist in the binary log]
1348 * binlog_format = MIXED: expect row events in binlog and no warning.
1349 Warnings:
1350 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1351 include/assert.inc [Event should be a Table_map_log_event]
1352 Warnings:
1353 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1354 DROP PROCEDURE proc_2;
1355
1356 Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe update of two autoinc columns.
1357 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
1358 * binlog_format = STATEMENT: expect 1 warnings.
1359 INSERT INTO trigger_table_2 VALUES (1);
1360 Warnings:
1361 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1362 include/assert.inc [There should be 1 warning(s)]
1363 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1364 include/assert.inc [There should be 0 warning(s)]
1365 include/assert.inc [Only two events should exist in the binary log]
1366 * binlog_format = MIXED: expect row events in binlog and no warning.
1367 Warnings:
1368 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1369 include/assert.inc [Event should be a Table_map_log_event]
1370 Warnings:
1371 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1372 DROP TRIGGER trig_2;
1373 DROP PROCEDURE proc_1;
1374
1375 Invoking trigger trig_1 invoking unsafe update of two autoinc columns.
1376 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO double_autoinc_table VALUES (NULL); END;
1377 * binlog_format = STATEMENT: expect 1 warnings.
1378 INSERT INTO trigger_table_1 VALUES (1);
1379 Warnings:
1380 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1381 include/assert.inc [There should be 1 warning(s)]
1382 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1383 include/assert.inc [There should be 0 warning(s)]
1384 include/assert.inc [Only two events should exist in the binary log]
1385 * binlog_format = MIXED: expect row events in binlog and no warning.
1386 Warnings:
1387 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1388 include/assert.inc [Event should be a Table_map_log_event]
1389 Warnings:
1390 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1391
1392 Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe update of two autoinc columns.
1393 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
1394 * binlog_format = STATEMENT: expect 1 warnings.
1395 INSERT INTO t2 SELECT func_sidef_2();
1396 Warnings:
1397 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1398 include/assert.inc [There should be 1 warning(s)]
1399 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1400 include/assert.inc [There should be 0 warning(s)]
1401 include/assert.inc [Only two events should exist in the binary log]
1402 * binlog_format = MIXED: expect row events in binlog and no warning.
1403 Warnings:
1404 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1405 include/assert.inc [Event should be a Table_map_log_event]
1406 Warnings:
1407 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1408 DROP FUNCTION func_sidef_2;
1409
1410 Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe update of two autoinc columns.
1411 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
1412 * binlog_format = STATEMENT: expect 1 warnings.
1413 CALL proc_2();
1414 Warnings:
1415 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1416 include/assert.inc [There should be 1 warning(s)]
1417 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1418 include/assert.inc [There should be 0 warning(s)]
1419 include/assert.inc [Only two events should exist in the binary log]
1420 * binlog_format = MIXED: expect row events in binlog and no warning.
1421 Warnings:
1422 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1423 include/assert.inc [Event should be a Table_map_log_event]
1424 Warnings:
1425 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1426 DROP PROCEDURE proc_2;
1427
1428 Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe update of two autoinc columns.
1429 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
1430 * binlog_format = STATEMENT: expect 1 warnings.
1431 INSERT INTO trigger_table_2 VALUES (1);
1432 Warnings:
1433 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1434 include/assert.inc [There should be 1 warning(s)]
1435 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1436 include/assert.inc [There should be 0 warning(s)]
1437 include/assert.inc [Only two events should exist in the binary log]
1438 * binlog_format = MIXED: expect row events in binlog and no warning.
1439 Warnings:
1440 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1441 include/assert.inc [Event should be a Table_map_log_event]
1442 Warnings:
1443 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1444 DROP TRIGGER trig_2;
1445 DROP TRIGGER trig_1;
1446
1447 Invoking prepared statement prep_1 invoking unsafe update of two autoinc columns.
1448 PREPARE prep_1 FROM "INSERT INTO double_autoinc_table VALUES (NULL)";
1449 * binlog_format = STATEMENT: expect 1 warnings.
1450 EXECUTE prep_1;
1451 Warnings:
1452 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
1453 include/assert.inc [There should be 1 warning(s)]
1454 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1455 include/assert.inc [There should be 0 warning(s)]
1456 include/assert.inc [Only two events should exist in the binary log]
1457 * binlog_format = MIXED: expect row events in binlog and no warning.
1458 Warnings:
1459 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1460 include/assert.inc [Event should be a Table_map_log_event]
1461 Warnings:
1462 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1463 DROP PREPARE prep_1;
1464
1465 ==== Testing unsafeness of UDF's ====
1466
1467 Invoking function func_retval_1 returning value from unsafe UDF.
1468 CREATE FUNCTION func_retval_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); RETURN myfunc_int(10); END;
1469 * binlog_format = STATEMENT: expect 1 warnings.
1470 INSERT INTO t1 VALUES (func_retval_1());
1471 Warnings:
1472 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1473 include/assert.inc [There should be 1 warning(s)]
1474 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1475 include/assert.inc [There should be 0 warning(s)]
1476 include/assert.inc [Only two events should exist in the binary log]
1477 * binlog_format = MIXED: expect row events in binlog and no warning.
1478 Warnings:
1479 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1480 include/assert.inc [Event should be a Table_map_log_event]
1481 Warnings:
1482 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1483 * Invoke statement so that return value is dicarded: expect no warning.
1484 SELECT func_retval_1();
1485
1486 Invoking function func_retval_2 returning value from function func_retval_1 returning value from unsafe UDF.
1487 CREATE FUNCTION func_retval_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); RETURN func_retval_1(); END;
1488 * binlog_format = STATEMENT: expect 1 warnings.
1489 INSERT INTO t2 VALUES (func_retval_2());
1490 Warnings:
1491 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1492 include/assert.inc [There should be 1 warning(s)]
1493 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1494 include/assert.inc [There should be 0 warning(s)]
1495 include/assert.inc [Only two events should exist in the binary log]
1496 * binlog_format = MIXED: expect row events in binlog and no warning.
1497 Warnings:
1498 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1499 include/assert.inc [Event should be a Table_map_log_event]
1500 Warnings:
1501 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1502 * Invoke statement so that return value is dicarded: expect no warning.
1503 SELECT func_retval_2();
1504 DROP FUNCTION func_retval_2;
1505
1506 Invoking function func_sidef_2 invoking function func_retval_1 returning value from unsafe UDF.
1507 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 VALUES (func_retval_1()); RETURN 0; END;
1508 * binlog_format = STATEMENT: expect 1 warnings.
1509 INSERT INTO t2 SELECT func_sidef_2();
1510 Warnings:
1511 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1512 include/assert.inc [There should be 1 warning(s)]
1513 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1514 include/assert.inc [There should be 0 warning(s)]
1515 include/assert.inc [Only two events should exist in the binary log]
1516 * binlog_format = MIXED: expect row events in binlog and no warning.
1517 Warnings:
1518 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1519 include/assert.inc [Event should be a Table_map_log_event]
1520 Warnings:
1521 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1522 DROP FUNCTION func_sidef_2;
1523
1524 Invoking procedure proc_2 invoking function func_retval_1 returning value from unsafe UDF.
1525 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 VALUES (func_retval_1()); INSERT INTO ta2 VALUES (47); END;
1526 * binlog_format = STATEMENT: expect 1 warnings.
1527 CALL proc_2();
1528 Warnings:
1529 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1530 include/assert.inc [There should be 1 warning(s)]
1531 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1532 include/assert.inc [There should be 0 warning(s)]
1533 include/assert.inc [Only two events should exist in the binary log]
1534 * binlog_format = MIXED: expect row events in binlog and no warning.
1535 Warnings:
1536 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1537 include/assert.inc [Event should be a Table_map_log_event]
1538 Warnings:
1539 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1540 DROP PROCEDURE proc_2;
1541
1542 Invoking trigger trig_2 invoking function func_retval_1 returning value from unsafe UDF.
1543 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 VALUES (func_retval_1()); END;
1544 * binlog_format = STATEMENT: expect 1 warnings.
1545 INSERT INTO trigger_table_2 VALUES (1);
1546 Warnings:
1547 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1548 include/assert.inc [There should be 1 warning(s)]
1549 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1550 include/assert.inc [There should be 0 warning(s)]
1551 include/assert.inc [Only two events should exist in the binary log]
1552 * binlog_format = MIXED: expect row events in binlog and no warning.
1553 Warnings:
1554 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1555 include/assert.inc [Event should be a Table_map_log_event]
1556 Warnings:
1557 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1558 DROP TRIGGER trig_2;
1559
1560 Invoking view view_retval_2 returning value from function func_retval_1 returning value from unsafe UDF.
1561 CREATE VIEW view_retval_2 AS SELECT func_retval_1();
1562 * binlog_format = STATEMENT: expect 1 warnings.
1563 INSERT INTO t2 SELECT * FROM view_retval_2;
1564 Warnings:
1565 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1566 include/assert.inc [There should be 1 warning(s)]
1567 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1568 include/assert.inc [There should be 0 warning(s)]
1569 include/assert.inc [Only two events should exist in the binary log]
1570 * binlog_format = MIXED: expect row events in binlog and no warning.
1571 Warnings:
1572 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1573 include/assert.inc [Event should be a Table_map_log_event]
1574 Warnings:
1575 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1576 * Invoke statement so that return value is dicarded: expect no warning.
1577 SELECT * FROM view_retval_2;
1578 DROP VIEW view_retval_2;
1579 DROP FUNCTION func_retval_1;
1580
1581 Invoking function func_sidef_1 invoking unsafe UDF.
1582 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 VALUES (myfunc_int(10)); RETURN 0; END;
1583 * binlog_format = STATEMENT: expect 1 warnings.
1584 INSERT INTO t1 SELECT func_sidef_1();
1585 Warnings:
1586 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1587 include/assert.inc [There should be 1 warning(s)]
1588 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1589 include/assert.inc [There should be 0 warning(s)]
1590 include/assert.inc [Only two events should exist in the binary log]
1591 * binlog_format = MIXED: expect row events in binlog and no warning.
1592 Warnings:
1593 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1594 include/assert.inc [Event should be a Table_map_log_event]
1595 Warnings:
1596 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1597
1598 Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe UDF.
1599 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
1600 * binlog_format = STATEMENT: expect 1 warnings.
1601 INSERT INTO t2 SELECT func_sidef_2();
1602 Warnings:
1603 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1604 include/assert.inc [There should be 1 warning(s)]
1605 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1606 include/assert.inc [There should be 0 warning(s)]
1607 include/assert.inc [Only two events should exist in the binary log]
1608 * binlog_format = MIXED: expect row events in binlog and no warning.
1609 Warnings:
1610 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1611 include/assert.inc [Event should be a Table_map_log_event]
1612 Warnings:
1613 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1614 DROP FUNCTION func_sidef_2;
1615
1616 Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe UDF.
1617 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
1618 * binlog_format = STATEMENT: expect 1 warnings.
1619 CALL proc_2();
1620 Warnings:
1621 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1622 include/assert.inc [There should be 1 warning(s)]
1623 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1624 include/assert.inc [There should be 0 warning(s)]
1625 include/assert.inc [Only two events should exist in the binary log]
1626 * binlog_format = MIXED: expect row events in binlog and no warning.
1627 Warnings:
1628 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1629 include/assert.inc [Event should be a Table_map_log_event]
1630 Warnings:
1631 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1632 DROP PROCEDURE proc_2;
1633
1634 Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe UDF.
1635 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
1636 * binlog_format = STATEMENT: expect 1 warnings.
1637 INSERT INTO trigger_table_2 VALUES (1);
1638 Warnings:
1639 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1640 include/assert.inc [There should be 1 warning(s)]
1641 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1642 include/assert.inc [There should be 0 warning(s)]
1643 include/assert.inc [Only two events should exist in the binary log]
1644 * binlog_format = MIXED: expect row events in binlog and no warning.
1645 Warnings:
1646 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1647 include/assert.inc [Event should be a Table_map_log_event]
1648 Warnings:
1649 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1650 DROP TRIGGER trig_2;
1651
1652 Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe UDF.
1653 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
1654 * binlog_format = STATEMENT: expect 1 warnings.
1655 INSERT INTO t2 SELECT * FROM view_sidef_2;
1656 Warnings:
1657 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1658 include/assert.inc [There should be 1 warning(s)]
1659 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1660 include/assert.inc [There should be 0 warning(s)]
1661 include/assert.inc [Only two events should exist in the binary log]
1662 * binlog_format = MIXED: expect row events in binlog and no warning.
1663 Warnings:
1664 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1665 include/assert.inc [Event should be a Table_map_log_event]
1666 Warnings:
1667 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1668 DROP VIEW view_sidef_2;
1669 DROP FUNCTION func_sidef_1;
1670
1671 Invoking procedure proc_1 invoking unsafe UDF.
1672 CREATE PROCEDURE proc_1() BEGIN INSERT INTO t0 VALUES (myfunc_int(10)); INSERT INTO ta1 VALUES (47); END;
1673 * binlog_format = STATEMENT: expect 1 warnings.
1674 CALL proc_1();
1675 Warnings:
1676 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1677 include/assert.inc [There should be 1 warning(s)]
1678 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1679 include/assert.inc [There should be 0 warning(s)]
1680 include/assert.inc [Only two events should exist in the binary log]
1681 * binlog_format = MIXED: expect row events in binlog and no warning.
1682 Warnings:
1683 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1684 include/assert.inc [Event should be a Table_map_log_event]
1685 Warnings:
1686 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1687
1688 Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe UDF.
1689 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
1690 * binlog_format = STATEMENT: expect 1 warnings.
1691 INSERT INTO t2 SELECT func_sidef_2();
1692 Warnings:
1693 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1694 include/assert.inc [There should be 1 warning(s)]
1695 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1696 include/assert.inc [There should be 0 warning(s)]
1697 include/assert.inc [Only two events should exist in the binary log]
1698 * binlog_format = MIXED: expect row events in binlog and no warning.
1699 Warnings:
1700 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1701 include/assert.inc [Event should be a Table_map_log_event]
1702 Warnings:
1703 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1704 DROP FUNCTION func_sidef_2;
1705
1706 Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe UDF.
1707 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
1708 * binlog_format = STATEMENT: expect 1 warnings.
1709 CALL proc_2();
1710 Warnings:
1711 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1712 include/assert.inc [There should be 1 warning(s)]
1713 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1714 include/assert.inc [There should be 0 warning(s)]
1715 include/assert.inc [Only two events should exist in the binary log]
1716 * binlog_format = MIXED: expect row events in binlog and no warning.
1717 Warnings:
1718 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1719 include/assert.inc [Event should be a Table_map_log_event]
1720 Warnings:
1721 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1722 DROP PROCEDURE proc_2;
1723
1724 Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe UDF.
1725 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
1726 * binlog_format = STATEMENT: expect 1 warnings.
1727 INSERT INTO trigger_table_2 VALUES (1);
1728 Warnings:
1729 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1730 include/assert.inc [There should be 1 warning(s)]
1731 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1732 include/assert.inc [There should be 0 warning(s)]
1733 include/assert.inc [Only two events should exist in the binary log]
1734 * binlog_format = MIXED: expect row events in binlog and no warning.
1735 Warnings:
1736 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1737 include/assert.inc [Event should be a Table_map_log_event]
1738 Warnings:
1739 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1740 DROP TRIGGER trig_2;
1741 DROP PROCEDURE proc_1;
1742
1743 Invoking trigger trig_1 invoking unsafe UDF.
1744 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 VALUES (myfunc_int(10)); END;
1745 * binlog_format = STATEMENT: expect 1 warnings.
1746 INSERT INTO trigger_table_1 VALUES (1);
1747 Warnings:
1748 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1749 include/assert.inc [There should be 1 warning(s)]
1750 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1751 include/assert.inc [There should be 0 warning(s)]
1752 include/assert.inc [Only two events should exist in the binary log]
1753 * binlog_format = MIXED: expect row events in binlog and no warning.
1754 Warnings:
1755 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1756 include/assert.inc [Event should be a Table_map_log_event]
1757 Warnings:
1758 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1759
1760 Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe UDF.
1761 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
1762 * binlog_format = STATEMENT: expect 1 warnings.
1763 INSERT INTO t2 SELECT func_sidef_2();
1764 Warnings:
1765 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1766 include/assert.inc [There should be 1 warning(s)]
1767 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1768 include/assert.inc [There should be 0 warning(s)]
1769 include/assert.inc [Only two events should exist in the binary log]
1770 * binlog_format = MIXED: expect row events in binlog and no warning.
1771 Warnings:
1772 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1773 include/assert.inc [Event should be a Table_map_log_event]
1774 Warnings:
1775 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1776 DROP FUNCTION func_sidef_2;
1777
1778 Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe UDF.
1779 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
1780 * binlog_format = STATEMENT: expect 1 warnings.
1781 CALL proc_2();
1782 Warnings:
1783 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1784 include/assert.inc [There should be 1 warning(s)]
1785 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1786 include/assert.inc [There should be 0 warning(s)]
1787 include/assert.inc [Only two events should exist in the binary log]
1788 * binlog_format = MIXED: expect row events in binlog and no warning.
1789 Warnings:
1790 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1791 include/assert.inc [Event should be a Table_map_log_event]
1792 Warnings:
1793 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1794 DROP PROCEDURE proc_2;
1795
1796 Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe UDF.
1797 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
1798 * binlog_format = STATEMENT: expect 1 warnings.
1799 INSERT INTO trigger_table_2 VALUES (1);
1800 Warnings:
1801 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1802 include/assert.inc [There should be 1 warning(s)]
1803 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1804 include/assert.inc [There should be 0 warning(s)]
1805 include/assert.inc [Only two events should exist in the binary log]
1806 * binlog_format = MIXED: expect row events in binlog and no warning.
1807 Warnings:
1808 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1809 include/assert.inc [Event should be a Table_map_log_event]
1810 Warnings:
1811 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1812 DROP TRIGGER trig_2;
1813 DROP TRIGGER trig_1;
1814
1815 Invoking view view_sidef_1 invoking unsafe UDF.
1816 CREATE VIEW view_sidef_1 AS SELECT myfunc_int(10);
1817 * binlog_format = STATEMENT: expect 1 warnings.
1818 INSERT INTO t1 SELECT * FROM view_sidef_1;
1819 Warnings:
1820 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1821 include/assert.inc [There should be 1 warning(s)]
1822 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1823 include/assert.inc [There should be 0 warning(s)]
1824 include/assert.inc [Only two events should exist in the binary log]
1825 * binlog_format = MIXED: expect row events in binlog and no warning.
1826 Warnings:
1827 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1828 include/assert.inc [Event should be a Table_map_log_event]
1829 Warnings:
1830 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1831
1832 Invoking function func_sidef_2 invoking view view_sidef_1 invoking unsafe UDF.
1833 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_sidef_1; RETURN 0; END;
1834 * binlog_format = STATEMENT: expect 1 warnings.
1835 INSERT INTO t2 SELECT func_sidef_2();
1836 Warnings:
1837 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1838 include/assert.inc [There should be 1 warning(s)]
1839 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1840 include/assert.inc [There should be 0 warning(s)]
1841 include/assert.inc [Only two events should exist in the binary log]
1842 * binlog_format = MIXED: expect row events in binlog and no warning.
1843 Warnings:
1844 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1845 include/assert.inc [Event should be a Table_map_log_event]
1846 Warnings:
1847 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1848 DROP FUNCTION func_sidef_2;
1849
1850 Invoking procedure proc_2 invoking view view_sidef_1 invoking unsafe UDF.
1851 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT * FROM view_sidef_1; INSERT INTO ta2 VALUES (47); END;
1852 * binlog_format = STATEMENT: expect 1 warnings.
1853 CALL proc_2();
1854 Warnings:
1855 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1856 include/assert.inc [There should be 1 warning(s)]
1857 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1858 include/assert.inc [There should be 0 warning(s)]
1859 include/assert.inc [Only two events should exist in the binary log]
1860 * binlog_format = MIXED: expect row events in binlog and no warning.
1861 Warnings:
1862 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1863 include/assert.inc [Event should be a Table_map_log_event]
1864 Warnings:
1865 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1866 DROP PROCEDURE proc_2;
1867
1868 Invoking trigger trig_2 invoking view view_sidef_1 invoking unsafe UDF.
1869 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_sidef_1; END;
1870 * binlog_format = STATEMENT: expect 1 warnings.
1871 INSERT INTO trigger_table_2 VALUES (1);
1872 Warnings:
1873 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1874 include/assert.inc [There should be 1 warning(s)]
1875 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1876 include/assert.inc [There should be 0 warning(s)]
1877 include/assert.inc [Only two events should exist in the binary log]
1878 * binlog_format = MIXED: expect row events in binlog and no warning.
1879 Warnings:
1880 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1881 include/assert.inc [Event should be a Table_map_log_event]
1882 Warnings:
1883 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1884 DROP TRIGGER trig_2;
1885
1886 Invoking view view_sidef_2 invoking view view_sidef_1 invoking unsafe UDF.
1887 CREATE VIEW view_sidef_2 AS SELECT * FROM view_sidef_1;
1888 * binlog_format = STATEMENT: expect 1 warnings.
1889 INSERT INTO t2 SELECT * FROM view_sidef_2;
1890 Warnings:
1891 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1892 include/assert.inc [There should be 1 warning(s)]
1893 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1894 include/assert.inc [There should be 0 warning(s)]
1895 include/assert.inc [Only two events should exist in the binary log]
1896 * binlog_format = MIXED: expect row events in binlog and no warning.
1897 Warnings:
1898 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1899 include/assert.inc [Event should be a Table_map_log_event]
1900 Warnings:
1901 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1902 DROP VIEW view_sidef_2;
1903 DROP VIEW view_sidef_1;
1904
1905 Invoking prepared statement prep_1 invoking unsafe UDF.
1906 PREPARE prep_1 FROM "INSERT INTO t0 VALUES (myfunc_int(10))";
1907 * binlog_format = STATEMENT: expect 1 warnings.
1908 EXECUTE prep_1;
1909 Warnings:
1910 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
1911 include/assert.inc [There should be 1 warning(s)]
1912 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1913 include/assert.inc [There should be 0 warning(s)]
1914 include/assert.inc [Only two events should exist in the binary log]
1915 * binlog_format = MIXED: expect row events in binlog and no warning.
1916 Warnings:
1917 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1918 include/assert.inc [Event should be a Table_map_log_event]
1919 Warnings:
1920 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1921 DROP PREPARE prep_1;
1922
1923 ==== Testing unsafeness of access to mysql.general_log ====
1924
1925 Invoking function func_sidef_1 invoking unsafe use of mysql.general_log.
1926 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log; RETURN 0; END;
1927 * binlog_format = STATEMENT: expect 1 warnings.
1928 INSERT INTO t1 SELECT func_sidef_1();
1929 Warnings:
1930 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
1931 include/assert.inc [There should be 1 warning(s)]
1932 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1933 include/assert.inc [There should be 0 warning(s)]
1934 include/assert.inc [Only two events should exist in the binary log]
1935 * binlog_format = MIXED: expect row events in binlog and no warning.
1936 Warnings:
1937 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1938 include/assert.inc [Event should be a Table_map_log_event]
1939 Warnings:
1940 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1941
1942 Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe use of mysql.general_log.
1943 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
1944 * binlog_format = STATEMENT: expect 1 warnings.
1945 INSERT INTO t2 SELECT func_sidef_2();
1946 Warnings:
1947 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
1948 include/assert.inc [There should be 1 warning(s)]
1949 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1950 include/assert.inc [There should be 0 warning(s)]
1951 include/assert.inc [Only two events should exist in the binary log]
1952 * binlog_format = MIXED: expect row events in binlog and no warning.
1953 Warnings:
1954 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1955 include/assert.inc [Event should be a Table_map_log_event]
1956 Warnings:
1957 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1958 DROP FUNCTION func_sidef_2;
1959
1960 Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe use of mysql.general_log.
1961 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
1962 * binlog_format = STATEMENT: expect 1 warnings.
1963 CALL proc_2();
1964 Warnings:
1965 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
1966 include/assert.inc [There should be 1 warning(s)]
1967 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1968 include/assert.inc [There should be 0 warning(s)]
1969 include/assert.inc [Only two events should exist in the binary log]
1970 * binlog_format = MIXED: expect row events in binlog and no warning.
1971 Warnings:
1972 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1973 include/assert.inc [Event should be a Table_map_log_event]
1974 Warnings:
1975 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1976 DROP PROCEDURE proc_2;
1977
1978 Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe use of mysql.general_log.
1979 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
1980 * binlog_format = STATEMENT: expect 1 warnings.
1981 INSERT INTO trigger_table_2 VALUES (1);
1982 Warnings:
1983 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
1984 include/assert.inc [There should be 1 warning(s)]
1985 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
1986 include/assert.inc [There should be 0 warning(s)]
1987 include/assert.inc [Only two events should exist in the binary log]
1988 * binlog_format = MIXED: expect row events in binlog and no warning.
1989 Warnings:
1990 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1991 include/assert.inc [Event should be a Table_map_log_event]
1992 Warnings:
1993 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
1994 DROP TRIGGER trig_2;
1995
1996 Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe use of mysql.general_log.
1997 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
1998 * binlog_format = STATEMENT: expect 1 warnings.
1999 INSERT INTO t2 SELECT * FROM view_sidef_2;
2000 Warnings:
2001 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2002 include/assert.inc [There should be 1 warning(s)]
2003 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2004 include/assert.inc [There should be 0 warning(s)]
2005 include/assert.inc [Only two events should exist in the binary log]
2006 * binlog_format = MIXED: expect row events in binlog and no warning.
2007 Warnings:
2008 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2009 include/assert.inc [Event should be a Table_map_log_event]
2010 Warnings:
2011 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2012 DROP VIEW view_sidef_2;
2013 DROP FUNCTION func_sidef_1;
2014
2015 Invoking procedure proc_1 invoking unsafe use of mysql.general_log.
2016 CREATE PROCEDURE proc_1() BEGIN INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log; INSERT INTO ta1 VALUES (47); END;
2017 * binlog_format = STATEMENT: expect 1 warnings.
2018 CALL proc_1();
2019 Warnings:
2020 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2021 include/assert.inc [There should be 1 warning(s)]
2022 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2023 include/assert.inc [There should be 0 warning(s)]
2024 include/assert.inc [Only two events should exist in the binary log]
2025 * binlog_format = MIXED: expect row events in binlog and no warning.
2026 Warnings:
2027 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2028 include/assert.inc [Event should be a Table_map_log_event]
2029 Warnings:
2030 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2031
2032 Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe use of mysql.general_log.
2033 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
2034 * binlog_format = STATEMENT: expect 1 warnings.
2035 INSERT INTO t2 SELECT func_sidef_2();
2036 Warnings:
2037 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2038 include/assert.inc [There should be 1 warning(s)]
2039 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2040 include/assert.inc [There should be 0 warning(s)]
2041 include/assert.inc [Only two events should exist in the binary log]
2042 * binlog_format = MIXED: expect row events in binlog and no warning.
2043 Warnings:
2044 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2045 include/assert.inc [Event should be a Table_map_log_event]
2046 Warnings:
2047 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2048 DROP FUNCTION func_sidef_2;
2049
2050 Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe use of mysql.general_log.
2051 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
2052 * binlog_format = STATEMENT: expect 1 warnings.
2053 CALL proc_2();
2054 Warnings:
2055 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2056 include/assert.inc [There should be 1 warning(s)]
2057 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2058 include/assert.inc [There should be 0 warning(s)]
2059 include/assert.inc [Only two events should exist in the binary log]
2060 * binlog_format = MIXED: expect row events in binlog and no warning.
2061 Warnings:
2062 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2063 include/assert.inc [Event should be a Table_map_log_event]
2064 Warnings:
2065 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2066 DROP PROCEDURE proc_2;
2067
2068 Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe use of mysql.general_log.
2069 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
2070 * binlog_format = STATEMENT: expect 1 warnings.
2071 INSERT INTO trigger_table_2 VALUES (1);
2072 Warnings:
2073 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2074 include/assert.inc [There should be 1 warning(s)]
2075 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2076 include/assert.inc [There should be 0 warning(s)]
2077 include/assert.inc [Only two events should exist in the binary log]
2078 * binlog_format = MIXED: expect row events in binlog and no warning.
2079 Warnings:
2080 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2081 include/assert.inc [Event should be a Table_map_log_event]
2082 Warnings:
2083 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2084 DROP TRIGGER trig_2;
2085 DROP PROCEDURE proc_1;
2086
2087 Invoking trigger trig_1 invoking unsafe use of mysql.general_log.
2088 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log; END;
2089 * binlog_format = STATEMENT: expect 1 warnings.
2090 INSERT INTO trigger_table_1 VALUES (1);
2091 Warnings:
2092 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2093 include/assert.inc [There should be 1 warning(s)]
2094 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2095 include/assert.inc [There should be 0 warning(s)]
2096 include/assert.inc [Only two events should exist in the binary log]
2097 * binlog_format = MIXED: expect row events in binlog and no warning.
2098 Warnings:
2099 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2100 include/assert.inc [Event should be a Table_map_log_event]
2101 Warnings:
2102 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2103
2104 Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe use of mysql.general_log.
2105 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
2106 * binlog_format = STATEMENT: expect 1 warnings.
2107 INSERT INTO t2 SELECT func_sidef_2();
2108 Warnings:
2109 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2110 include/assert.inc [There should be 1 warning(s)]
2111 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2112 include/assert.inc [There should be 0 warning(s)]
2113 include/assert.inc [Only two events should exist in the binary log]
2114 * binlog_format = MIXED: expect row events in binlog and no warning.
2115 Warnings:
2116 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2117 include/assert.inc [Event should be a Table_map_log_event]
2118 Warnings:
2119 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2120 DROP FUNCTION func_sidef_2;
2121
2122 Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe use of mysql.general_log.
2123 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
2124 * binlog_format = STATEMENT: expect 1 warnings.
2125 CALL proc_2();
2126 Warnings:
2127 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2128 include/assert.inc [There should be 1 warning(s)]
2129 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2130 include/assert.inc [There should be 0 warning(s)]
2131 include/assert.inc [Only two events should exist in the binary log]
2132 * binlog_format = MIXED: expect row events in binlog and no warning.
2133 Warnings:
2134 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2135 include/assert.inc [Event should be a Table_map_log_event]
2136 Warnings:
2137 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2138 DROP PROCEDURE proc_2;
2139
2140 Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe use of mysql.general_log.
2141 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
2142 * binlog_format = STATEMENT: expect 1 warnings.
2143 INSERT INTO trigger_table_2 VALUES (1);
2144 Warnings:
2145 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2146 include/assert.inc [There should be 1 warning(s)]
2147 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2148 include/assert.inc [There should be 0 warning(s)]
2149 include/assert.inc [Only two events should exist in the binary log]
2150 * binlog_format = MIXED: expect row events in binlog and no warning.
2151 Warnings:
2152 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2153 include/assert.inc [Event should be a Table_map_log_event]
2154 Warnings:
2155 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2156 DROP TRIGGER trig_2;
2157 DROP TRIGGER trig_1;
2158
2159 Invoking view view_retval_1 returning value from unsafe use of mysql.general_log.
2160 CREATE VIEW view_retval_1 AS SELECT COUNT(*) FROM mysql.general_log;
2161 * binlog_format = STATEMENT: expect 1 warnings.
2162 INSERT INTO t1 SELECT * FROM view_retval_1;
2163 Warnings:
2164 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2165 include/assert.inc [There should be 1 warning(s)]
2166 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2167 include/assert.inc [There should be 0 warning(s)]
2168 include/assert.inc [Only two events should exist in the binary log]
2169 * binlog_format = MIXED: expect row events in binlog and no warning.
2170 Warnings:
2171 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2172 include/assert.inc [Event should be a Table_map_log_event]
2173 Warnings:
2174 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2175 * Invoke statement so that return value is dicarded: expect no warning.
2176 SELECT * FROM view_retval_1;
2177
2178 Invoking function func_sidef_2 invoking view view_retval_1 returning value from unsafe use of mysql.general_log.
2179 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_retval_1; RETURN 0; END;
2180 * binlog_format = STATEMENT: expect 1 warnings.
2181 INSERT INTO t2 SELECT func_sidef_2();
2182 Warnings:
2183 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2184 include/assert.inc [There should be 1 warning(s)]
2185 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2186 include/assert.inc [There should be 0 warning(s)]
2187 include/assert.inc [Only two events should exist in the binary log]
2188 * binlog_format = MIXED: expect row events in binlog and no warning.
2189 Warnings:
2190 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2191 include/assert.inc [Event should be a Table_map_log_event]
2192 Warnings:
2193 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2194 DROP FUNCTION func_sidef_2;
2195
2196 Invoking procedure proc_2 invoking view view_retval_1 returning value from unsafe use of mysql.general_log.
2197 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT * FROM view_retval_1; INSERT INTO ta2 VALUES (47); END;
2198 * binlog_format = STATEMENT: expect 1 warnings.
2199 CALL proc_2();
2200 Warnings:
2201 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2202 include/assert.inc [There should be 1 warning(s)]
2203 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2204 include/assert.inc [There should be 0 warning(s)]
2205 include/assert.inc [Only two events should exist in the binary log]
2206 * binlog_format = MIXED: expect row events in binlog and no warning.
2207 Warnings:
2208 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2209 include/assert.inc [Event should be a Table_map_log_event]
2210 Warnings:
2211 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2212 DROP PROCEDURE proc_2;
2213
2214 Invoking trigger trig_2 invoking view view_retval_1 returning value from unsafe use of mysql.general_log.
2215 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_retval_1; END;
2216 * binlog_format = STATEMENT: expect 1 warnings.
2217 INSERT INTO trigger_table_2 VALUES (1);
2218 Warnings:
2219 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2220 include/assert.inc [There should be 1 warning(s)]
2221 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2222 include/assert.inc [There should be 0 warning(s)]
2223 include/assert.inc [Only two events should exist in the binary log]
2224 * binlog_format = MIXED: expect row events in binlog and no warning.
2225 Warnings:
2226 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2227 include/assert.inc [Event should be a Table_map_log_event]
2228 Warnings:
2229 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2230 DROP TRIGGER trig_2;
2231
2232 Invoking view view_retval_2 returning value from view view_retval_1 returning value from unsafe use of mysql.general_log.
2233 CREATE VIEW view_retval_2 AS SELECT * FROM view_retval_1;
2234 * binlog_format = STATEMENT: expect 1 warnings.
2235 INSERT INTO t2 SELECT * FROM view_retval_2;
2236 Warnings:
2237 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2238 include/assert.inc [There should be 1 warning(s)]
2239 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2240 include/assert.inc [There should be 0 warning(s)]
2241 include/assert.inc [Only two events should exist in the binary log]
2242 * binlog_format = MIXED: expect row events in binlog and no warning.
2243 Warnings:
2244 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2245 include/assert.inc [Event should be a Table_map_log_event]
2246 Warnings:
2247 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2248 * Invoke statement so that return value is dicarded: expect no warning.
2249 SELECT * FROM view_retval_2;
2250 DROP VIEW view_retval_2;
2251 DROP VIEW view_retval_1;
2252
2253 Invoking prepared statement prep_1 invoking unsafe use of mysql.general_log.
2254 PREPARE prep_1 FROM "INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log";
2255 * binlog_format = STATEMENT: expect 1 warnings.
2256 EXECUTE prep_1;
2257 Warnings:
2258 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2259 include/assert.inc [There should be 1 warning(s)]
2260 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2261 include/assert.inc [There should be 0 warning(s)]
2262 include/assert.inc [Only two events should exist in the binary log]
2263 * binlog_format = MIXED: expect row events in binlog and no warning.
2264 Warnings:
2265 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2266 include/assert.inc [Event should be a Table_map_log_event]
2267 Warnings:
2268 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2269 DROP PREPARE prep_1;
2270
2271 ==== Testing a statement that is unsafe in many ways ====
2272
2273 Invoking function func_sidef_1 invoking statement that is unsafe in many ways.
2274 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; RETURN 0; END;
2275 * binlog_format = STATEMENT: expect 7 warnings.
2276 INSERT INTO t1 SELECT func_sidef_1();
2277 Warnings:
2278 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2279 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2280 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2281 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2282 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2283 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2284 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2285 include/assert.inc [There should be 7 warning(s)]
2286 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2287 include/assert.inc [There should be 0 warning(s)]
2288 include/assert.inc [Only two events should exist in the binary log]
2289 * binlog_format = MIXED: expect row events in binlog and no warning.
2290 Warnings:
2291 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2292 include/assert.inc [Event should be a Table_map_log_event]
2293 Warnings:
2294 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2295
2296 Invoking function func_sidef_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways.
2297 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
2298 * binlog_format = STATEMENT: expect 7 warnings.
2299 INSERT INTO t2 SELECT func_sidef_2();
2300 Warnings:
2301 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2302 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2303 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2304 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2305 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2306 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2307 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2308 include/assert.inc [There should be 7 warning(s)]
2309 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2310 include/assert.inc [There should be 0 warning(s)]
2311 include/assert.inc [Only two events should exist in the binary log]
2312 * binlog_format = MIXED: expect row events in binlog and no warning.
2313 Warnings:
2314 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2315 include/assert.inc [Event should be a Table_map_log_event]
2316 Warnings:
2317 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2318 DROP FUNCTION func_sidef_2;
2319
2320 Invoking procedure proc_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways.
2321 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
2322 * binlog_format = STATEMENT: expect 7 warnings.
2323 CALL proc_2();
2324 Warnings:
2325 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2326 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2327 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2328 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2329 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2330 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2331 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2332 include/assert.inc [There should be 7 warning(s)]
2333 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2334 include/assert.inc [There should be 0 warning(s)]
2335 include/assert.inc [Only two events should exist in the binary log]
2336 * binlog_format = MIXED: expect row events in binlog and no warning.
2337 Warnings:
2338 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2339 include/assert.inc [Event should be a Table_map_log_event]
2340 Warnings:
2341 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2342 DROP PROCEDURE proc_2;
2343
2344 Invoking trigger trig_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways.
2345 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
2346 * binlog_format = STATEMENT: expect 7 warnings.
2347 INSERT INTO trigger_table_2 VALUES (1);
2348 Warnings:
2349 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2350 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2351 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2352 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2353 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2354 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2355 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2356 include/assert.inc [There should be 7 warning(s)]
2357 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2358 include/assert.inc [There should be 0 warning(s)]
2359 include/assert.inc [Only two events should exist in the binary log]
2360 * binlog_format = MIXED: expect row events in binlog and no warning.
2361 Warnings:
2362 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2363 include/assert.inc [Event should be a Table_map_log_event]
2364 Warnings:
2365 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2366 DROP TRIGGER trig_2;
2367
2368 Invoking view view_sidef_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways.
2369 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
2370 * binlog_format = STATEMENT: expect 7 warnings.
2371 INSERT INTO t2 SELECT * FROM view_sidef_2;
2372 Warnings:
2373 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2374 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2375 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2376 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2377 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2378 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2379 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2380 include/assert.inc [There should be 7 warning(s)]
2381 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2382 include/assert.inc [There should be 0 warning(s)]
2383 include/assert.inc [Only two events should exist in the binary log]
2384 * binlog_format = MIXED: expect row events in binlog and no warning.
2385 Warnings:
2386 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2387 include/assert.inc [Event should be a Table_map_log_event]
2388 Warnings:
2389 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2390 DROP VIEW view_sidef_2;
2391 DROP FUNCTION func_sidef_1;
2392
2393 Invoking procedure proc_1 invoking statement that is unsafe in many ways.
2394 CREATE PROCEDURE proc_1() BEGIN INSERT INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; INSERT INTO ta1 VALUES (47); END;
2395 * binlog_format = STATEMENT: expect 7 warnings.
2396 CALL proc_1();
2397 Warnings:
2398 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2399 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2400 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2401 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2402 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2403 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2404 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2405 include/assert.inc [There should be 7 warning(s)]
2406 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2407 include/assert.inc [There should be 0 warning(s)]
2408 include/assert.inc [Only two events should exist in the binary log]
2409 * binlog_format = MIXED: expect row events in binlog and no warning.
2410 Warnings:
2411 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2412 include/assert.inc [Event should be a Table_map_log_event]
2413 Warnings:
2414 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2415
2416 Invoking function func_sidef_2 invoking procedure proc_1 invoking statement that is unsafe in many ways.
2417 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
2418 * binlog_format = STATEMENT: expect 7 warnings.
2419 INSERT INTO t2 SELECT func_sidef_2();
2420 Warnings:
2421 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2422 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2423 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2424 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2425 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2426 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2427 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2428 include/assert.inc [There should be 7 warning(s)]
2429 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2430 include/assert.inc [There should be 0 warning(s)]
2431 include/assert.inc [Only two events should exist in the binary log]
2432 * binlog_format = MIXED: expect row events in binlog and no warning.
2433 Warnings:
2434 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2435 include/assert.inc [Event should be a Table_map_log_event]
2436 Warnings:
2437 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2438 DROP FUNCTION func_sidef_2;
2439
2440 Invoking procedure proc_2 invoking procedure proc_1 invoking statement that is unsafe in many ways.
2441 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
2442 * binlog_format = STATEMENT: expect 7 warnings.
2443 CALL proc_2();
2444 Warnings:
2445 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2446 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2447 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2448 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2449 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2450 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2451 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2452 include/assert.inc [There should be 7 warning(s)]
2453 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2454 include/assert.inc [There should be 0 warning(s)]
2455 include/assert.inc [Only two events should exist in the binary log]
2456 * binlog_format = MIXED: expect row events in binlog and no warning.
2457 Warnings:
2458 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2459 include/assert.inc [Event should be a Table_map_log_event]
2460 Warnings:
2461 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2462 DROP PROCEDURE proc_2;
2463
2464 Invoking trigger trig_2 invoking procedure proc_1 invoking statement that is unsafe in many ways.
2465 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
2466 * binlog_format = STATEMENT: expect 7 warnings.
2467 INSERT INTO trigger_table_2 VALUES (1);
2468 Warnings:
2469 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2470 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2471 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2472 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2473 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2474 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2475 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2476 include/assert.inc [There should be 7 warning(s)]
2477 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2478 include/assert.inc [There should be 0 warning(s)]
2479 include/assert.inc [Only two events should exist in the binary log]
2480 * binlog_format = MIXED: expect row events in binlog and no warning.
2481 Warnings:
2482 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2483 include/assert.inc [Event should be a Table_map_log_event]
2484 Warnings:
2485 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2486 DROP TRIGGER trig_2;
2487 DROP PROCEDURE proc_1;
2488
2489 Invoking trigger trig_1 invoking statement that is unsafe in many ways.
2490 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; END;
2491 * binlog_format = STATEMENT: expect 7 warnings.
2492 INSERT INTO trigger_table_1 VALUES (1);
2493 Warnings:
2494 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2495 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2496 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2497 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2498 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2499 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2500 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2501 include/assert.inc [There should be 7 warning(s)]
2502 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2503 include/assert.inc [There should be 0 warning(s)]
2504 include/assert.inc [Only two events should exist in the binary log]
2505 * binlog_format = MIXED: expect row events in binlog and no warning.
2506 Warnings:
2507 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2508 include/assert.inc [Event should be a Table_map_log_event]
2509 Warnings:
2510 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2511
2512 Invoking function func_sidef_2 invoking trigger trig_1 invoking statement that is unsafe in many ways.
2513 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
2514 * binlog_format = STATEMENT: expect 7 warnings.
2515 INSERT INTO t2 SELECT func_sidef_2();
2516 Warnings:
2517 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2518 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2519 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2520 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2521 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2522 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2523 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2524 include/assert.inc [There should be 7 warning(s)]
2525 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2526 include/assert.inc [There should be 0 warning(s)]
2527 include/assert.inc [Only two events should exist in the binary log]
2528 * binlog_format = MIXED: expect row events in binlog and no warning.
2529 Warnings:
2530 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2531 include/assert.inc [Event should be a Table_map_log_event]
2532 Warnings:
2533 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2534 DROP FUNCTION func_sidef_2;
2535
2536 Invoking procedure proc_2 invoking trigger trig_1 invoking statement that is unsafe in many ways.
2537 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
2538 * binlog_format = STATEMENT: expect 7 warnings.
2539 CALL proc_2();
2540 Warnings:
2541 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2542 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2543 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2544 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2545 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2546 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2547 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2548 include/assert.inc [There should be 7 warning(s)]
2549 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2550 include/assert.inc [There should be 0 warning(s)]
2551 include/assert.inc [Only two events should exist in the binary log]
2552 * binlog_format = MIXED: expect row events in binlog and no warning.
2553 Warnings:
2554 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2555 include/assert.inc [Event should be a Table_map_log_event]
2556 Warnings:
2557 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2558 DROP PROCEDURE proc_2;
2559
2560 Invoking trigger trig_2 invoking trigger trig_1 invoking statement that is unsafe in many ways.
2561 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
2562 * binlog_format = STATEMENT: expect 7 warnings.
2563 INSERT INTO trigger_table_2 VALUES (1);
2564 Warnings:
2565 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2566 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2567 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2568 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2569 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2570 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2571 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2572 include/assert.inc [There should be 7 warning(s)]
2573 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2574 include/assert.inc [There should be 0 warning(s)]
2575 include/assert.inc [Only two events should exist in the binary log]
2576 * binlog_format = MIXED: expect row events in binlog and no warning.
2577 Warnings:
2578 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2579 include/assert.inc [Event should be a Table_map_log_event]
2580 Warnings:
2581 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2582 DROP TRIGGER trig_2;
2583 DROP TRIGGER trig_1;
2584
2585 Invoking prepared statement prep_1 invoking statement that is unsafe in many ways.
2586 PREPARE prep_1 FROM "INSERT INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1";
2587 * binlog_format = STATEMENT: expect 7 warnings.
2588 EXECUTE prep_1;
2589 Warnings:
2590 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
2591 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on replicas.
2592 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
2593 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the replica.
2594 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2595 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2596 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on source and the replica.
2597 include/assert.inc [There should be 7 warning(s)]
2598 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2599 include/assert.inc [There should be 0 warning(s)]
2600 include/assert.inc [Only two events should exist in the binary log]
2601 * binlog_format = MIXED: expect row events in binlog and no warning.
2602 Warnings:
2603 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2604 include/assert.inc [Event should be a Table_map_log_event]
2605 Warnings:
2606 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2607 DROP PREPARE prep_1;
2608
2609 ==== Testing a statement that is unsafe several times ====
2610
2611 Invoking function func_sidef_1 invoking statement that is unsafe several times.
2612 CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO ta0 VALUES (multi_unsafe_func()); RETURN 0; END;
2613 * binlog_format = STATEMENT: expect 2 warnings.
2614 INSERT INTO t1 SELECT func_sidef_1();
2615 Warnings:
2616 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2617 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2618 include/assert.inc [There should be 2 warning(s)]
2619 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2620 include/assert.inc [There should be 0 warning(s)]
2621 include/assert.inc [Only two events should exist in the binary log]
2622 * binlog_format = MIXED: expect row events in binlog and no warning.
2623 Warnings:
2624 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2625 include/assert.inc [Event should be a Table_map_log_event]
2626 Warnings:
2627 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2628
2629 Invoking function func_sidef_2 invoking function func_sidef_1 invoking statement that is unsafe several times.
2630 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END;
2631 * binlog_format = STATEMENT: expect 2 warnings.
2632 INSERT INTO t2 SELECT func_sidef_2();
2633 Warnings:
2634 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2635 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2636 include/assert.inc [There should be 2 warning(s)]
2637 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2638 include/assert.inc [There should be 0 warning(s)]
2639 include/assert.inc [Only two events should exist in the binary log]
2640 * binlog_format = MIXED: expect row events in binlog and no warning.
2641 Warnings:
2642 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2643 include/assert.inc [Event should be a Table_map_log_event]
2644 Warnings:
2645 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2646 DROP FUNCTION func_sidef_2;
2647
2648 Invoking procedure proc_2 invoking function func_sidef_1 invoking statement that is unsafe several times.
2649 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END;
2650 * binlog_format = STATEMENT: expect 2 warnings.
2651 CALL proc_2();
2652 Warnings:
2653 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2654 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2655 include/assert.inc [There should be 2 warning(s)]
2656 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2657 include/assert.inc [There should be 0 warning(s)]
2658 include/assert.inc [Only two events should exist in the binary log]
2659 * binlog_format = MIXED: expect row events in binlog and no warning.
2660 Warnings:
2661 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2662 include/assert.inc [Event should be a Table_map_log_event]
2663 Warnings:
2664 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2665 DROP PROCEDURE proc_2;
2666
2667 Invoking trigger trig_2 invoking function func_sidef_1 invoking statement that is unsafe several times.
2668 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END;
2669 * binlog_format = STATEMENT: expect 2 warnings.
2670 INSERT INTO trigger_table_2 VALUES (1);
2671 Warnings:
2672 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2673 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2674 include/assert.inc [There should be 2 warning(s)]
2675 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2676 include/assert.inc [There should be 0 warning(s)]
2677 include/assert.inc [Only two events should exist in the binary log]
2678 * binlog_format = MIXED: expect row events in binlog and no warning.
2679 Warnings:
2680 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2681 include/assert.inc [Event should be a Table_map_log_event]
2682 Warnings:
2683 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2684 DROP TRIGGER trig_2;
2685
2686 Invoking view view_sidef_2 invoking function func_sidef_1 invoking statement that is unsafe several times.
2687 CREATE VIEW view_sidef_2 AS SELECT func_sidef_1();
2688 * binlog_format = STATEMENT: expect 2 warnings.
2689 INSERT INTO t2 SELECT * FROM view_sidef_2;
2690 Warnings:
2691 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2692 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2693 include/assert.inc [There should be 2 warning(s)]
2694 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2695 include/assert.inc [There should be 0 warning(s)]
2696 include/assert.inc [Only two events should exist in the binary log]
2697 * binlog_format = MIXED: expect row events in binlog and no warning.
2698 Warnings:
2699 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2700 include/assert.inc [Event should be a Table_map_log_event]
2701 Warnings:
2702 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2703 DROP VIEW view_sidef_2;
2704 DROP FUNCTION func_sidef_1;
2705
2706 Invoking procedure proc_1 invoking statement that is unsafe several times.
2707 CREATE PROCEDURE proc_1() BEGIN INSERT INTO ta0 VALUES (multi_unsafe_func()); INSERT INTO ta1 VALUES (47); END;
2708 * binlog_format = STATEMENT: expect 2 warnings.
2709 CALL proc_1();
2710 Warnings:
2711 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2712 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2713 include/assert.inc [There should be 2 warning(s)]
2714 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2715 include/assert.inc [There should be 0 warning(s)]
2716 include/assert.inc [Only two events should exist in the binary log]
2717 * binlog_format = MIXED: expect row events in binlog and no warning.
2718 Warnings:
2719 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2720 include/assert.inc [Event should be a Table_map_log_event]
2721 Warnings:
2722 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2723
2724 Invoking function func_sidef_2 invoking procedure proc_1 invoking statement that is unsafe several times.
2725 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END;
2726 * binlog_format = STATEMENT: expect 2 warnings.
2727 INSERT INTO t2 SELECT func_sidef_2();
2728 Warnings:
2729 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2730 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2731 include/assert.inc [There should be 2 warning(s)]
2732 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2733 include/assert.inc [There should be 0 warning(s)]
2734 include/assert.inc [Only two events should exist in the binary log]
2735 * binlog_format = MIXED: expect row events in binlog and no warning.
2736 Warnings:
2737 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2738 include/assert.inc [Event should be a Table_map_log_event]
2739 Warnings:
2740 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2741 DROP FUNCTION func_sidef_2;
2742
2743 Invoking procedure proc_2 invoking procedure proc_1 invoking statement that is unsafe several times.
2744 CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END;
2745 * binlog_format = STATEMENT: expect 2 warnings.
2746 CALL proc_2();
2747 Warnings:
2748 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2749 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2750 include/assert.inc [There should be 2 warning(s)]
2751 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2752 include/assert.inc [There should be 0 warning(s)]
2753 include/assert.inc [Only two events should exist in the binary log]
2754 * binlog_format = MIXED: expect row events in binlog and no warning.
2755 Warnings:
2756 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2757 include/assert.inc [Event should be a Table_map_log_event]
2758 Warnings:
2759 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2760 DROP PROCEDURE proc_2;
2761
2762 Invoking trigger trig_2 invoking procedure proc_1 invoking statement that is unsafe several times.
2763 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END;
2764 * binlog_format = STATEMENT: expect 2 warnings.
2765 INSERT INTO trigger_table_2 VALUES (1);
2766 Warnings:
2767 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2768 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2769 include/assert.inc [There should be 2 warning(s)]
2770 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2771 include/assert.inc [There should be 0 warning(s)]
2772 include/assert.inc [Only two events should exist in the binary log]
2773 * binlog_format = MIXED: expect row events in binlog and no warning.
2774 Warnings:
2775 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2776 include/assert.inc [Event should be a Table_map_log_event]
2777 Warnings:
2778 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2779 DROP TRIGGER trig_2;
2780 DROP PROCEDURE proc_1;
2781
2782 Invoking trigger trig_1 invoking statement that is unsafe several times.
2783 CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT INTO ta0 VALUES (multi_unsafe_func()); END;
2784 * binlog_format = STATEMENT: expect 2 warnings.
2785 INSERT INTO trigger_table_1 VALUES (1);
2786 Warnings:
2787 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2788 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2789 include/assert.inc [There should be 2 warning(s)]
2790 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2791 include/assert.inc [There should be 0 warning(s)]
2792 include/assert.inc [Only two events should exist in the binary log]
2793 * binlog_format = MIXED: expect row events in binlog and no warning.
2794 Warnings:
2795 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2796 include/assert.inc [Event should be a Table_map_log_event]
2797 Warnings:
2798 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2799
2800 Invoking function func_sidef_2 invoking trigger trig_1 invoking statement that is unsafe several times.
2801 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END;
2802 * binlog_format = STATEMENT: expect 2 warnings.
2803 INSERT INTO t2 SELECT func_sidef_2();
2804 Warnings:
2805 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2806 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2807 include/assert.inc [There should be 2 warning(s)]
2808 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2809 include/assert.inc [There should be 0 warning(s)]
2810 include/assert.inc [Only two events should exist in the binary log]
2811 * binlog_format = MIXED: expect row events in binlog and no warning.
2812 Warnings:
2813 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2814 include/assert.inc [Event should be a Table_map_log_event]
2815 Warnings:
2816 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2817 DROP FUNCTION func_sidef_2;
2818
2819 Invoking procedure proc_2 invoking trigger trig_1 invoking statement that is unsafe several times.
2820 CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END;
2821 * binlog_format = STATEMENT: expect 2 warnings.
2822 CALL proc_2();
2823 Warnings:
2824 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2825 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2826 include/assert.inc [There should be 2 warning(s)]
2827 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2828 include/assert.inc [There should be 0 warning(s)]
2829 include/assert.inc [Only two events should exist in the binary log]
2830 * binlog_format = MIXED: expect row events in binlog and no warning.
2831 Warnings:
2832 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2833 include/assert.inc [Event should be a Table_map_log_event]
2834 Warnings:
2835 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2836 DROP PROCEDURE proc_2;
2837
2838 Invoking trigger trig_2 invoking trigger trig_1 invoking statement that is unsafe several times.
2839 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END;
2840 * binlog_format = STATEMENT: expect 2 warnings.
2841 INSERT INTO trigger_table_2 VALUES (1);
2842 Warnings:
2843 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2844 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2845 include/assert.inc [There should be 2 warning(s)]
2846 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2847 include/assert.inc [There should be 0 warning(s)]
2848 include/assert.inc [Only two events should exist in the binary log]
2849 * binlog_format = MIXED: expect row events in binlog and no warning.
2850 Warnings:
2851 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2852 include/assert.inc [Event should be a Table_map_log_event]
2853 Warnings:
2854 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2855 DROP TRIGGER trig_2;
2856 DROP TRIGGER trig_1;
2857
2858 Invoking view view_sidef_1 invoking statement that is unsafe several times.
2859 CREATE VIEW view_sidef_1 AS SELECT multi_unsafe_func();
2860 * binlog_format = STATEMENT: expect 2 warnings.
2861 INSERT INTO t1 SELECT * FROM view_sidef_1;
2862 Warnings:
2863 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2864 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2865 include/assert.inc [There should be 2 warning(s)]
2866 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2867 include/assert.inc [There should be 0 warning(s)]
2868 include/assert.inc [Only two events should exist in the binary log]
2869 * binlog_format = MIXED: expect row events in binlog and no warning.
2870 Warnings:
2871 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2872 include/assert.inc [Event should be a Table_map_log_event]
2873 Warnings:
2874 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2875
2876 Invoking function func_sidef_2 invoking view view_sidef_1 invoking statement that is unsafe several times.
2877 CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_sidef_1; RETURN 0; END;
2878 * binlog_format = STATEMENT: expect 2 warnings.
2879 INSERT INTO t2 SELECT func_sidef_2();
2880 Warnings:
2881 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2882 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2883 include/assert.inc [There should be 2 warning(s)]
2884 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2885 include/assert.inc [There should be 0 warning(s)]
2886 include/assert.inc [Only two events should exist in the binary log]
2887 * binlog_format = MIXED: expect row events in binlog and no warning.
2888 Warnings:
2889 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2890 include/assert.inc [Event should be a Table_map_log_event]
2891 Warnings:
2892 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2893 DROP FUNCTION func_sidef_2;
2894
2895 Invoking procedure proc_2 invoking view view_sidef_1 invoking statement that is unsafe several times.
2896 CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT * FROM view_sidef_1; INSERT INTO ta2 VALUES (47); END;
2897 * binlog_format = STATEMENT: expect 2 warnings.
2898 CALL proc_2();
2899 Warnings:
2900 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2901 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2902 include/assert.inc [There should be 2 warning(s)]
2903 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2904 include/assert.inc [There should be 0 warning(s)]
2905 include/assert.inc [Only two events should exist in the binary log]
2906 * binlog_format = MIXED: expect row events in binlog and no warning.
2907 Warnings:
2908 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2909 include/assert.inc [Event should be a Table_map_log_event]
2910 Warnings:
2911 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2912 DROP PROCEDURE proc_2;
2913
2914 Invoking trigger trig_2 invoking view view_sidef_1 invoking statement that is unsafe several times.
2915 CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT * FROM view_sidef_1; END;
2916 * binlog_format = STATEMENT: expect 2 warnings.
2917 INSERT INTO trigger_table_2 VALUES (1);
2918 Warnings:
2919 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2920 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2921 include/assert.inc [There should be 2 warning(s)]
2922 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2923 include/assert.inc [There should be 0 warning(s)]
2924 include/assert.inc [Only two events should exist in the binary log]
2925 * binlog_format = MIXED: expect row events in binlog and no warning.
2926 Warnings:
2927 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2928 include/assert.inc [Event should be a Table_map_log_event]
2929 Warnings:
2930 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2931 DROP TRIGGER trig_2;
2932
2933 Invoking view view_sidef_2 invoking view view_sidef_1 invoking statement that is unsafe several times.
2934 CREATE VIEW view_sidef_2 AS SELECT * FROM view_sidef_1;
2935 * binlog_format = STATEMENT: expect 2 warnings.
2936 INSERT INTO t2 SELECT * FROM view_sidef_2;
2937 Warnings:
2938 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2939 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2940 include/assert.inc [There should be 2 warning(s)]
2941 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2942 include/assert.inc [There should be 0 warning(s)]
2943 include/assert.inc [Only two events should exist in the binary log]
2944 * binlog_format = MIXED: expect row events in binlog and no warning.
2945 Warnings:
2946 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2947 include/assert.inc [Event should be a Table_map_log_event]
2948 Warnings:
2949 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2950 DROP VIEW view_sidef_2;
2951 DROP VIEW view_sidef_1;
2952
2953 Invoking prepared statement prep_1 invoking statement that is unsafe several times.
2954 PREPARE prep_1 FROM "INSERT INTO ta0 VALUES (multi_unsafe_func())";
2955 * binlog_format = STATEMENT: expect 2 warnings.
2956 EXECUTE prep_1;
2957 Warnings:
2958 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
2959 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
2960 include/assert.inc [There should be 2 warning(s)]
2961 * SQL_LOG_BIN = 0: expect nothing logged and only deprecation warnings.
2962 include/assert.inc [There should be 0 warning(s)]
2963 include/assert.inc [Only two events should exist in the binary log]
2964 * binlog_format = MIXED: expect row events in binlog and no warning.
2965 Warnings:
2966 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2967 include/assert.inc [Event should be a Table_map_log_event]
2968 Warnings:
2969 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
2970 DROP PREPARE prep_1;
2971 DROP TRIGGER double_autoinc_trig;
2972 DROP TABLE t0, t1, t2, t3, ta0, ta1, ta2, ta3,
2973 autoinc_table, double_autoinc_table,
2974 data_table,
2975 trigger_table_1, trigger_table_2, trigger_table_3;
2976 DROP FUNCTION myfunc_int;
2977 DROP FUNCTION multi_unsafe_func;
2978 ==== Special system variables that should *not* be unsafe ====
2979 CREATE TABLE t1 (a VARCHAR(1000));
2980 CREATE TABLE autoinc_table (a INT PRIMARY KEY AUTO_INCREMENT);
2981 INSERT INTO t1 VALUES (@@session.auto_increment_increment);
2982 INSERT INTO t1 VALUES (@@session.auto_increment_offset);
2983 INSERT INTO t1 VALUES (@@session.character_set_client);
2984 INSERT INTO t1 VALUES (@@session.character_set_connection);
2985 INSERT INTO t1 VALUES (@@session.character_set_database);
2986 INSERT INTO t1 VALUES (@@session.character_set_server);
2987 INSERT INTO t1 VALUES (@@session.collation_connection);
2988 INSERT INTO t1 VALUES (@@session.collation_database);
2989 INSERT INTO t1 VALUES (@@session.collation_server);
2990 INSERT INTO t1 VALUES (@@session.foreign_key_checks);
2991 INSERT INTO t1 VALUES (@@session.identity);
2992 INSERT INTO t1 VALUES (@@session.last_insert_id);
2993 INSERT INTO t1 VALUES (@@session.lc_time_names);
2994 INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
2995 INSERT INTO t1 VALUES (@@session.sql_auto_is_null);
2996 INSERT INTO t1 VALUES (@@session.timestamp);
2997 INSERT INTO t1 VALUES (@@session.time_zone);
2998 INSERT INTO t1 VALUES (@@session.unique_checks);
2999 SET @my_var= 4711;
3000 INSERT INTO t1 VALUES (@my_var);
3001 SET insert_id= 12;
3002 INSERT INTO autoinc_table VALUES (NULL);
3003 The following variables *should* give a warning, despite they are replicated.
3004 INSERT INTO t1 VALUES (@@session.sql_mode);
3005 Warnings:
3006 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
3007 INSERT INTO t1 VALUES (@@session.insert_id);
3008 Warnings:
3009 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
3010 DROP TABLE t1, autoinc_table;
3011 CREATE TABLE t1(a INT, b INT, KEY(a), PRIMARY KEY(b));
3012 INSERT INTO t1 SELECT * FROM t1 LIMIT 1;
3013 Warnings:
3014 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3015 REPLACE INTO t1 SELECT * FROM t1 LIMIT 1;
3016 Warnings:
3017 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3018 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on source and the replica.
3019 UPDATE t1 SET a=1 LIMIT 1;
3020 Warnings:
3021 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3022 DELETE FROM t1 LIMIT 1;
3023 Warnings:
3024 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3025 CREATE PROCEDURE p1()
3026 BEGIN
3027 INSERT INTO t1 SELECT * FROM t1 LIMIT 1;
3028 REPLACE INTO t1 SELECT * FROM t1 LIMIT 1;
3029 UPDATE t1 SET a=1 LIMIT 1;
3030 DELETE FROM t1 LIMIT 1;
3031 END|
3032 CALL p1();
3033 Warnings:
3034 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3035 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on source and the replica.
3036 DROP PROCEDURE p1;
3037 DROP TABLE t1;
3038 DROP TABLE IF EXISTS t1;
3039 CREATE TABLE t1 (a VARCHAR(100), b VARCHAR(100));
3040 INSERT INTO t1 VALUES ('a','b');
3041 UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1;
3042 Warnings:
3043 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3044 DROP TABLE t1;
3045 DROP TABLE IF EXISTS t1, t2;
3046 CREATE TABLE t1(i INT PRIMARY KEY);
3047 CREATE TABLE t2(i INT PRIMARY KEY);
3048 CREATE TABLE t3(i INT, ch CHAR(50));
3049 "Should issue message Statement may not be safe to log in statement format."
3050 INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
3051 Warnings:
3052 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3053 CREATE FUNCTION func6()
3054 RETURNS INT
3055 BEGIN
3056 INSERT INTO t1 VALUES (10);
3057 INSERT INTO t1 VALUES (11);
3058 INSERT INTO t1 VALUES (12);
3059 RETURN 0;
3060 END|
3061 "Should issue message Statement may not be safe to log in statement format only once"
3062 INSERT INTO t3 VALUES(func6(), UUID());
3063 Warnings:
3064 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3065 "Check whether SET @@SQL_LOG_BIN = 0/1 doesn't work in substatements"
3066 CREATE FUNCTION fun_check_log_bin() RETURNS INT
3067 BEGIN
3068 SET @@SQL_LOG_BIN = 0;
3069 INSERT INTO t1 VALUES(@@global.sync_binlog);
3070 RETURN 100;
3071 END|
3072 "One unsafe warning should be issued in the following statement"
3073 SELECT fun_check_log_bin();
3074 ERROR HY000: Cannot change the sql_log_bin inside a stored function or trigger
3075 "SQL_LOG_BIN should be ON still"
3076 SHOW VARIABLES LIKE "SQL_LOG_BIN";
3077 Variable_name Value
3078 sql_log_bin ON
3079 set @save_log_bin = @@SESSION.SQL_LOG_BIN;
3080 set @@SESSION.SQL_LOG_BIN = 0;
3081 "Should NOT have any warning message issued in the following statements"
3082 INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
3083 DROP TABLE t1,t2;
3084 "Should NOT have any warning message issued in the following func7() and trig"
3085 CREATE TABLE t1 (a INT);
3086 CREATE TABLE t2 (a TEXT);
3087 CREATE TABLE trigger_table (a CHAR(7));
3088 CREATE FUNCTION func7()
3089 RETURNS INT
3090 BEGIN
3091 INSERT INTO t1 VALUES (@@global.sync_binlog);
3092 INSERT INTO t1 VALUES (@@session.insert_id);
3093 INSERT INTO t2 SELECT UUID();
3094 INSERT INTO t2 VALUES (@@session.sql_mode);
3095 INSERT INTO t2 VALUES (@@global.init_replica);
3096 RETURN 0;
3097 END|
3098 SHOW VARIABLES LIKE "SQL_LOG_BIN";
3099 Variable_name Value
3100 sql_log_bin OFF
3101 SELECT func7();
3102 func7()
3103 0
3104 ---- Insert from trigger ----
3105 CREATE TRIGGER trig
3106 BEFORE INSERT ON trigger_table
3107 FOR EACH ROW
3108 BEGIN
3109 INSERT INTO t1 VALUES (@@global.sync_binlog);
3110 INSERT INTO t1 VALUES (@@session.insert_id);
3111 INSERT INTO t1 VALUES (@@global.auto_increment_increment);
3112 INSERT INTO t2 SELECT UUID();
3113 INSERT INTO t2 VALUES (@@session.sql_mode);
3114 INSERT INTO t2 VALUES (@@global.init_replica);
3115 INSERT INTO t2 VALUES (@@hostname);
3116 END|
3117 INSERT INTO trigger_table VALUES ('bye.');
3118 DROP FUNCTION fun_check_log_bin;
3119 DROP FUNCTION func6;
3120 DROP FUNCTION func7;
3121 DROP TRIGGER trig;
3122 DROP TABLE t1, t2, t3, trigger_table;
3123 set @@SESSION.SQL_LOG_BIN = @save_log_bin;
3124 SET @save_sql_mode = @@SESSION.SQL_MODE;
3125 SET @@SESSION.SQL_MODE = STRICT_ALL_TABLES;
3126 Warnings:
3127 Warning 3135 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
3128 CREATE TABLE t1(i INT PRIMARY KEY);
3129 CREATE TABLE t2(i INT PRIMARY KEY);
3130 INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
3131 Warnings:
3132 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3133 INSERT INTO t1 VALUES(@@global.sync_binlog);
3134 Warnings:
3135 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
3136 UPDATE t1 SET i = 999 LIMIT 1;
3137 Warnings:
3138 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3139 DELETE FROM t1 LIMIT 1;
3140 Warnings:
3141 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
3142 DROP TABLE t1, t2;
3143 SET @@SESSION.SQL_MODE = @save_sql_mode;
3144 SET @old_binlog_format = @@session.binlog_format;
3145 Warnings:
3146 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
3147 SET binlog_format = MIXED;
3148 Warnings:
3149 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
3150 CREATE TABLE t1 (a INT);
3151 CREATE TABLE t2 (a INT);
3152 INSERT INTO t2 VALUES (1), (2);
3153 CREATE FUNCTION func_limit ()
3154 RETURNS INT
3155 BEGIN
3156 INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
3157 RETURN 1;
3158 END|
3159 RESET MASTER;
3160 SELECT func_limit();
3161 func_limit()
3162 1
3163 include/show_binlog_events.inc
3164 Log_name Pos Event_type Server_id End_log_pos Info
3165 binlog.000001 # Query # # BEGIN
3166 binlog.000001 # Table_map # # table_id: # (test.t1)
3167 binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F
3168 binlog.000001 # Query # # COMMIT
3169 SET @@session.binlog_format = @old_binlog_format;
3170 Warnings:
3171 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
3172 DROP TABLE t1, t2;
3173 DROP FUNCTION func_limit;
3174 CREATE TABLE t1 (a INT, b INT PRIMARY KEY AUTO_INCREMENT);
3175 CREATE TABLE t2 (a INT, b INT PRIMARY KEY AUTO_INCREMENT);
3176 CREATE FUNCTION func_modify_t1 ()
3177 RETURNS INT
3178 BEGIN
3179 INSERT INTO t1 SET a = 1;
3180 RETURN 0;
3181 END|
3182 # The following statement causes auto-incrementation
3183 # of both t1 and t2. It is logged in statement format,
3184 # so it should produce unsafe warning.
3185 INSERT INTO t2 SET a = func_modify_t1();
3186 Warnings:
3187 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
3188 SET SESSION binlog_format = MIXED;
3189 Warnings:
3190 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
3191 # Check if the statement is logged in row format.
3192 INSERT INTO t2 SET a = func_modify_t1();
3193 include/show_binlog_events.inc
3194 Log_name Pos Event_type Server_id End_log_pos Info
3195 binlog.000001 # Query # # BEGIN
3196 binlog.000001 # Table_map # # table_id: # (test.t2)
3197 binlog.000001 # Table_map # # table_id: # (test.t1)
3198 binlog.000001 # Write_rows # # table_id: #
3199 binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F
3200 binlog.000001 # Query # # COMMIT
3201 DROP TABLE t1,t2;
3202 DROP FUNCTION func_modify_t1;
3203 SET SESSION binlog_format = STATEMENT;
3204 Warnings:
3205 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
3206 CREATE TABLE t1 (a INT);
3207 CREATE TABLE t2 (a INT, b INT PRIMARY KEY AUTO_INCREMENT);
3208 CREATE TABLE t3 (a INT, b INT PRIMARY KEY AUTO_INCREMENT);
3209 create trigger tri_modify_two_tables before insert on t1 for each row begin
3210 insert into t2(a) values(new.a);
3211 insert into t3(a) values(new.a);
3212 end |
3213 # The following statement causes auto-incrementation
3214 # of both t2 and t3. It is logged in statement format,
3215 # so it should produce unsafe warning
3216 INSERT INTO t1 SET a = 1;
3217 Warnings:
3218 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly.
3219 SET SESSION binlog_format = MIXED;
3220 Warnings:
3221 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
3222 # Check if the statement is logged in row format.
3223 INSERT INTO t1 SET a = 2;
3224 include/show_binlog_events.inc
3225 Log_name Pos Event_type Server_id End_log_pos Info
3226 binlog.000001 # Query # # BEGIN
3227 binlog.000001 # Table_map # # table_id: # (test.t1)
3228 binlog.000001 # Table_map # # table_id: # (test.t2)
3229 binlog.000001 # Table_map # # table_id: # (test.t3)
3230 binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F
3231 binlog.000001 # Table_map # # table_id: # (test.t1)
3232 binlog.000001 # Table_map # # table_id: # (test.t2)
3233 binlog.000001 # Table_map # # table_id: # (test.t3)
3234 binlog.000001 # Write_rows # # table_id: #
3235 binlog.000001 # Write_rows # # table_id: # flags: STMT_END_F
3236 binlog.000001 # Query # # COMMIT
3237 DROP TABLE t1,t2,t3;
3238 SET SESSION binlog_format = STATEMENT;
3239 Warnings:
3240 Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
3241 CREATE TABLE t1 (a VARCHAR(1000)) charset latin1;
3242 INSERT INTO t1 VALUES (CURRENT_USER());
3243 Warnings:
3244 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3245 INSERT INTO t1 VALUES (FOUND_ROWS());
3246 Warnings:
3247 Warning 1287 FOUND_ROWS() is deprecated and will be removed in a future release. Consider using COUNT(*) instead.
3248 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3249 INSERT INTO t1 VALUES (GET_LOCK('tmp', 1));
3250 Warnings:
3251 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3252 INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp'));
3253 Warnings:
3254 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3255 INSERT INTO t1 VALUES (IS_USED_LOCK('tmp'));
3256 Warnings:
3257 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3258 INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat'));
3259 Warnings:
3260 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3261 INSERT INTO t1 VALUES (SOURCE_POS_WAIT('dummy arg', 4711, 1));
3262 Warnings:
3263 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3264 INSERT INTO t1 VALUES (RELEASE_LOCK('tmp'));
3265 Warnings:
3266 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3267 INSERT INTO t1 VALUES (ROW_COUNT());
3268 Warnings:
3269 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3270 INSERT INTO t1 VALUES (SESSION_USER());
3271 Warnings:
3272 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3273 INSERT INTO t1 VALUES (SLEEP(1));
3274 Warnings:
3275 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3276 INSERT INTO t1 VALUES (SYSDATE());
3277 Warnings:
3278 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3279 INSERT INTO t1 VALUES (SYSTEM_USER());
3280 Warnings:
3281 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3282 INSERT INTO t1 VALUES (USER());
3283 Warnings:
3284 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3285 INSERT INTO t1 VALUES (UUID());
3286 Warnings:
3287 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3288 INSERT INTO t1 VALUES (UUID_SHORT());
3289 Warnings:
3290 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3291 INSERT INTO t1 VALUES (VERSION());
3292 Warnings:
3293 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3294 INSERT INTO t1 VALUES (RAND());
3295 Warnings:
3296 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3297 INSERT INTO t1 VALUES (RANDOM_BYTES(16));
3298 Warnings:
3299 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3300 INSERT INTO t1 VALUES (AES_ENCRYPT('a', 'a'));
3301 Warnings:
3302 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3303 INSERT INTO t1 VALUES (AES_DECRYPT('a', 'a'));
3304 Warnings:
3305 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
3306 DELETE FROM t1;
3307 SET TIMESTAMP=1000000;
3308 INSERT INTO t1 VALUES
3309 (CURDATE()),
3310 (CURRENT_DATE()),
3311 (CURRENT_TIME()),
3312 (CURRENT_TIMESTAMP()),
3313 (CURTIME()),
3314 (LOCALTIME()),
3315 (LOCALTIMESTAMP()),
3316 (NOW()),
3317 (UNIX_TIMESTAMP()),
3318 (UTC_DATE()),
3319 (UTC_TIME()),
3320 (UTC_TIMESTAMP());
3321 SELECT * FROM t1;
3322 a
3323 1970-01-12
3324 1970-01-12
3325 16:46:40
3326 1970-01-12 16:46:40
3327 16:46:40
3328 1970-01-12 16:46:40
3329 1970-01-12 16:46:40
3330 1970-01-12 16:46:40
3331 1000000
3332 1970-01-12
3333 13:46:40
3334 1970-01-12 13:46:40
3335 DROP TABLE t1;
3336 CREATE TABLE filler_table (a INT, b INT);
3337 INSERT INTO filler_table values (1,1),(1,2);
3338 CREATE TABLE insert_table (a INT, b INT, PRIMARY KEY(a));
3339 CREATE TABLE replace_table (a INT, b INT, PRIMARY KEY(a));
3340 INSERT INTO replace_table values (1,1),(2,2);
3341 CREATE TABLE update_table (a INT, b INT, PRIMARY KEY(a));
3342 INSERT INTO update_table values (1,1),(2,2);
3343 CREATE TABLE insert_2_keys (a INT UNIQUE KEY, b INT UNIQUE KEY) ENGINE = InnoDB;
3344 INSERT INTO insert_2_keys values (1, 1);
3345 INSERT IGNORE INTO insert_table SELECT * FROM filler_table;
3346 Warnings:
3347 Warning 1062 Duplicate entry '1' for key 'insert_table.PRIMARY'
3348 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on source and the replica.
3349 TRUNCATE TABLE insert_table;
3350 INSERT INTO insert_table SELECT * FROM filler_table ON DUPLICATE KEY UPDATE a = 1;
3351 Warnings:
3352 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on source and the replica.
3353 TRUNCATE TABLE insert_table;
3354 REPLACE INTO replace_table SELECT * FROM filler_table;
3355 Warnings:
3356 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on source and the replica.
3357 UPDATE IGNORE update_table SET a=2;
3358 Warnings:
3359 Warning 1062 Duplicate entry '2' for key 'update_table.PRIMARY'
3360 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on source and the replica.
3361 CREATE TABLE create_ignore_test (a INT, b INT, PRIMARY KEY(b)) IGNORE SELECT * FROM filler_table;
3362 Warnings:
3363 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on source and the replica.
3364 CREATE TABLE create_replace_test (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
3365 Warnings:
3366 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on source and the replica.
3367 CREATE TEMPORARY TABLE temp1 (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
3368 Warnings:
3369 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on source and the replica.
3370 INSERT INTO insert_2_keys VALUES (1, 2)
3371 ON DUPLICATE KEY UPDATE a=VALUES(a)+10, b=VALUES(b)+10;
3372 Warnings:
3373 Warning 1287 'VALUES function' is deprecated and will be removed in a future release. Please use an alias (INSERT INTO ... VALUES (...) AS alias) and replace VALUES(col) in the ON DUPLICATE KEY UPDATE clause with alias.col instead
3374 Warning 1287 'VALUES function' is deprecated and will be removed in a future release. Please use an alias (INSERT INTO ... VALUES (...) AS alias) and replace VALUES(col) in the ON DUPLICATE KEY UPDATE clause with alias.col instead
3375 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe
3376 DROP TABLE filler_table;
3377 DROP TABLE insert_table;
3378 DROP TABLE update_table;
3379 DROP TABLE replace_table;
3380 DROP TABLE create_ignore_test;
3381 DROP TABLE create_replace_test;
3382 DROP TABLE insert_2_keys;
3383 #
3384 # Bug#28297486: WL#9418: ERROR AND WARNING RELATED ISSUES
3385 #
3386 CREATE TABLE t(d DOUBLE DEFAULT (RAND()));
3387 CREATE FUNCTION f() RETURNS INT
3388 BEGIN
3389 INSERT INTO t VALUES ();
3390 RETURN 123;
3391 END|
3392 SELECT f();
3393 f()
3394 123
3395 Warnings:
3396 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it invokes a trigger or a stored function that modifies a table that has a column with a DEFAULT expression that may return a different value on the replica.
3397 DROP FUNCTION f;
3398 DROP TABLE t;
3399 SET GLOBAL log_output=@old_log_output;
3400 TRUNCATE TABLE mysql.general_log;
3401 "End of tests"