File: rpl_begin_commit_rollback.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (501 lines) | stat: -rw-r--r-- 19,184 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection master]
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
SET @@session.binlog_direct_non_transactional_updates= FALSE;
CREATE DATABASE replicate_do_db;
CREATE DATABASE binlog_ignore_db;
USE replicate_do_db;
CREATE TABLE replicate_do_db.t1 (a INT) ENGINE=InnoDB;
CREATE TABLE replicate_do_db.t2 (s CHAR(255)) ENGINE=MyISAM;
include/sync_slave_sql_with_master.inc
include/stop_slave.inc
[connection master]
CREATE PROCEDURE replicate_do_db.p1 ()
BEGIN
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
END//
CREATE PROCEDURE replicate_do_db.p2 ()
BEGIN
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
INSERT INTO t2 VALUES ('executed replicate_do_db.p2()');
END//
INSERT INTO replicate_do_db.t2 VALUES ('before call replicate_do_db.p1()');
USE test;
BEGIN;
CALL replicate_do_db.p1();
COMMIT;
INSERT INTO replicate_do_db.t2 VALUES ('after call replicate_do_db.p1()');
SELECT * FROM replicate_do_db.t1;
a
1
2
3
4
5
SELECT * FROM replicate_do_db.t2;
s
before call replicate_do_db.p1()
after call replicate_do_db.p1()
[connection slave]
START SLAVE UNTIL SOURCE_LOG_FILE='master-bin.000001', SOURCE_LOG_POS=MASTER_POS;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/assert.inc [Slave should have stopped after executing the stored procedure transaction]
SELECT * from replicate_do_db.t1;
a
1
2
3
4
5
SELECT * from replicate_do_db.t2;
s
before call replicate_do_db.p1()
[connection master]
INSERT INTO replicate_do_db.t2 VALUES ('before call replicate_do_db.p2()');
BEGIN;
CALL replicate_do_db.p2();
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
ROLLBACK;
INSERT INTO replicate_do_db.t2 VALUES ('after call replicate_do_db.p2()');
SELECT * FROM replicate_do_db.t1;
a
1
2
3
4
5
SELECT * FROM replicate_do_db.t2;
s
before call replicate_do_db.p1()
after call replicate_do_db.p1()
before call replicate_do_db.p2()
executed replicate_do_db.p2()
after call replicate_do_db.p2()
[connection slave]
START SLAVE UNTIL SOURCE_LOG_FILE='master-bin.000001', SOURCE_LOG_POS=MASTER_POS;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_stop.inc
include/assert.inc [Slave should have stopped after executing the stored procedure transaction]
SELECT * from replicate_do_db.t1;
a
1
2
3
4
5
SELECT * from replicate_do_db.t2;
s
before call replicate_do_db.p1()
executed replicate_do_db.p2()
START SLAVE;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc
#
# SAVEPOINT and ROLLBACK TO have the same problem in BUG#43263
# This was reported by BUG#50407
[connection master]
BEGIN;
INSERT INTO replicate_do_db.t1 VALUES(20);
# 
# Verify whether this statement is binlogged correctly
/*comment*/ SAVEPOINT has_comment;
USE replicate_do_db;
INSERT INTO replicate_do_db.t1 VALUES(30);
INSERT INTO replicate_do_db.t2 VALUES("in savepoint has_comment");
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
USE binlog_ignore_db;
SavePoint mixed_cases;
USE replicate_do_db;
INSERT INTO replicate_do_db.t2 VALUES("in savepoint mixed_cases");
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
INSERT INTO replicate_do_db.t1 VALUES(40);
USE binlog_ignore_db;
ROLLBACK TO mixed_cases;
Warnings:
Warning	1196	Some non-transactional changed tables couldn't be rolled back
ROLLBACK TO has_comment;
Warnings:
Warning	1196	Some non-transactional changed tables couldn't be rolled back
USE replicate_do_db;
INSERT INTO replicate_do_db.t2 VALUES("after rollback to");
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
INSERT INTO replicate_do_db.t1 VALUES(50);
USE binlog_ignore_db;
COMMIT;
include/show_binlog_events.inc
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
master-bin.000001	#	Query	#	#	BEGIN
master-bin.000001	#	Query	#	#	use `test`; INSERT INTO replicate_do_db.t1 VALUES(20)
master-bin.000001	#	Query	#	#	SAVEPOINT `has_comment`
master-bin.000001	#	Query	#	#	use `replicate_do_db`; INSERT INTO replicate_do_db.t1 VALUES(30)
master-bin.000001	#	Query	#	#	use `replicate_do_db`; INSERT INTO replicate_do_db.t2 VALUES("in savepoint has_comment")
master-bin.000001	#	Query	#	#	SAVEPOINT `mixed_cases`
master-bin.000001	#	Query	#	#	use `replicate_do_db`; INSERT INTO replicate_do_db.t2 VALUES("in savepoint mixed_cases")
master-bin.000001	#	Query	#	#	use `replicate_do_db`; INSERT INTO replicate_do_db.t1 VALUES(40)
master-bin.000001	#	Query	#	#	ROLLBACK TO `mixed_cases`
master-bin.000001	#	Query	#	#	ROLLBACK TO `has_comment`
master-bin.000001	#	Query	#	#	use `replicate_do_db`; INSERT INTO replicate_do_db.t2 VALUES("after rollback to")
master-bin.000001	#	Query	#	#	use `replicate_do_db`; INSERT INTO replicate_do_db.t1 VALUES(50)
master-bin.000001	#	Xid	#	#	COMMIT /* XID */
include/sync_slave_sql_with_master.inc
[on slave]
#
# Verify INSERT statements in savepoints are executed, for MyISAM table
# is not effected by ROLLBACK TO
SELECT * FROM replicate_do_db.t2 WHERE s LIKE '% savepoint %';
s
in savepoint has_comment
in savepoint mixed_cases
#
# Verify INSERT statements on the Innodb table are rolled back;
SELECT * FROM replicate_do_db.t1 WHERE a IN (30, 40);
a

# BUG#55798 Slave SQL retry on transaction inserts extra data into
# non-transaction table
# ----------------------------------------------------------------
# To verify that SQL thread does not retry a transaction which can
# not be rolled back safely, even though only a temporary error is
# encountered.

[connection master]
USE replicate_do_db;
DROP TABLE t1, t2;
CREATE TABLE t1(c1 INT KEY, c2 CHAR(100)) ENGINE=InnoDB;
CREATE TABLE t2(c1 INT) ENGINE=MyISAM;
CREATE TABLE t3(c1 INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1, "master");
SET @@session.binlog_direct_non_transactional_updates= FALSE;
include/sync_slave_sql_with_master.inc
# [ on slave ]
USE replicate_do_db;
SET @timeout_old= @@GLOBAL.innodb_lock_wait_timeout;
SET GLOBAL innodb_lock_wait_timeout= 1;
STOP SLAVE SQL_THREAD;
Warnings:
Warning	1287	'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
include/wait_for_slave_sql_to_stop.inc
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc
# Verify the SQL thread doesn't retry the transaction when one of
# its statements has modified a non-transactional table.
# ----------------------------------------------------------------

# INSERT statement inserts a row to a non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
INSERT INTO t2 VALUES(1);
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
UPDATE t1 SET c2='INSERT INTO t2 VALUES(1)' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# INSERT ... SELECT statement inserts a row to a non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
INSERT INTO t2 SELECT 2;
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
UPDATE t1 SET c2='INSERT INTO t2 SELECT 2' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# UPDATE statement updates a row to a non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
UPDATE t2 SET c1= 3;
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
UPDATE t1 SET c2='UPDATE t2 SET c1= 3' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# MULTI-UPDATE statement updates a row to a non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
UPDATE t2, t3 SET t2.c1=4, t3.c1= 4;
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
UPDATE t1 SET c2='UPDATE t2, t3 SET t2.c1=4, t3.c1= 4' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# DELETE statement deletes a row from a non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
DELETE FROM t2;
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
UPDATE t1 SET c2='DELETE FROM t2' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# CREATE TEMPORARY TABLE statement in the transaction
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
CREATE TEMPORARY TABLE IF NOT EXISTS temp_t(c1 INT);
UPDATE t1 SET c2='CREATE TEMPORARY TABLE IF NOT EXISTS temp_t(c1 INT)' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# DROP TEMPORARY TABLE statement in the transaction
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
DROP TEMPORARY TABLE IF EXISTS temp_t;
UPDATE t1 SET c2='DROP TEMPORARY TABLE IF EXISTS temp_t' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# Verify that the SQL thread doesn't retry the transaction if one
# of the sub-statements has modified a non-transactional table.
# ----------------------------------------------------------------
CREATE FUNCTION f_insert()
RETURNS INT
BEGIN
INSERT INTO t2 VALUES(1);
RETURN 2;
END|
CREATE FUNCTION f_insert_select()
RETURNS INT
BEGIN
INSERT INTO t2 SELECT 2;
RETURN 2;
END|
CREATE FUNCTION f_update()
RETURNS INT
BEGIN
UPDATE t2 SET c1=3;
RETURN 2;
END |
CREATE TABLE t4 (c1 INT) |
INSERT INTO t4 VAlUES(1),(2) |
CREATE FUNCTION f_multi_update()
RETURNS INT
BEGIN
UPDATE t2, t4 SET t2.c1=4, t4.c1= 4;
RETURN 2;
END |
CREATE FUNCTION f_delete()
RETURNS INT
BEGIN
DELETE FROM t2;
RETURN 2;
END |

# The INSERT statement in a function inserts a row into a
# non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
INSERT INTO t3 VALUES(f_insert());
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
UPDATE t1 SET c2='INSERT INTO t3 VALUES(f_insert())' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# The INSERT ... SELECT statement in a function inserts a row into a
# non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
INSERT INTO t3 VALUES(f_insert());
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
UPDATE t1 SET c2='INSERT INTO t3 VALUES(f_insert())' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# The UPDATE statement in a function updates a row of a
# non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
INSERT INTO t3 VALUES(f_update());
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
UPDATE t1 SET c2='INSERT INTO t3 VALUES(f_update())' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# The MULTI-UPDATE statement in a function updates a row of a
# non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
INSERT INTO t3 VALUES(f_multi_update());
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
UPDATE t1 SET c2='INSERT INTO t3 VALUES(f_multi_update())' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc

# The DELETE statement in a function deletes a row from a
# non-transactional table.
# [ on slave ]
BEGIN;
# It will lock table t1 on the row in which c1 is 1 until COMMIT or ROLLBACK
UPDATE t1 SET c2= "slave" WHERE c1= 1;
# [ on master ]
BEGIN;
INSERT INTO t3 VALUES(1);
INSERT INTO t3 VALUES(f_delete());
Warnings:
Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.
UPDATE t1 SET c2='INSERT INTO t3 VALUES(f_delete())' WHERE c1= 1;
COMMIT;
# [ on slave ]
include/wait_for_slave_sql_error.inc [errno=1205]
ROLLBACK;
START SLAVE SQL_THREAD;
Warnings:
Warning	1287	'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_to_start.inc
SET @@global.innodb_lock_wait_timeout= @timeout_old;
#
# Clean up
#
DROP DATABASE replicate_do_db;
DROP DATABASE binlog_ignore_db;
include/rpl_end.inc