@@ -18,7 +18,23 @@ ELSE 'SERIALIZABLE' END`;
1818eval SET TRANSACTION ISOLATION LEVEL $tx_isolation;
1919BEGIN;
2020DELETE FROM t1 WHERE b='2' AND c=2;
21- --replace_regex /.*(\d+ lock struct...), heap size \d+(, \d+ row lock...).*/\1\2/
21+ # The SHOW ENGINE INNODB STATUS looks like this:
22+ #
23+ # ...
24+ # +LIST OF TRANSACTIONS FOR EACH SESSION:
25+ # +---TRANSACTION (0x7f1e08168300), not started
26+ # +0 lock struct(s), heap size 1144, 0 row lock(s)
27+ # +---TRANSACTION (0x7f1e08167780), not started
28+ # +0 lock struct(s), heap size 1144, 0 row lock(s)
29+ # +---TRANSACTION 25, ACTIVE 0 sec
30+ # +2 lock struct(s), heap size 1144, 1 row lock(s)
31+ # ...
32+ #
33+ # We want the lock struct(s) and row lock(s) of the ACTIVE transaction, but
34+ # not of any inactive ones. Note the use of non-greedy match ".*?", so that
35+ # we get the values for the ACTIVE transaction, not the last values in the
36+ # list.
37+ --replace_regex /.*---TRANSACTION \d+, ACTIVE.*?(\d+ lock struct...), heap size \d+(, \d+ row lock...).*/\1\2/
2238SHOW ENGINE INNODB STATUS;
2339ROLLBACK;
2440
0 commit comments