1
################################################################################
3
# UPDATE using multiple statements. Subtract a value (4) from one field, then
4
# add the same value to another field in the same row.
6
# Mind any tx errors, ROLLBACK if needed to "equalize" different engines.
8
################################################################################
12
eval SET @conn_id = CONNECTION_ID(), @thread_id = 0;
14
--error 0, ER_LOCK_DEADLOCK, ER_LOCK_WAIT_TIMEOUT, ER_CHECKREAD
15
UPDATE t1 SET `int1` = `int1` - 4,
18
`connection_id` = @conn_id,
19
`thread_id` = @thread_id
22
--source suite/engines/rr_trx/include/check_for_error_rollback.inc
24
--echo *** UPDATEing row with pk = 4 and `int1_key` +=4 if above statement succeeded (query log disabled)...
28
# This is conditional, so disable query log to avoid irrelevant diffs.
30
--error 0, ER_LOCK_DEADLOCK, ER_LOCK_WAIT_TIMEOUT, ER_CHECKREAD
31
UPDATE t1 SET `int1_key` = `int1_key` + 4,
33
`connection_id` = @conn_id,
34
`thread_id` = @thread_id
37
--source suite/engines/rr_trx/include/check_for_error_rollback.inc