1
The partition_innodb test only fails if run immediately after innodb_trx_weight.
2
The reason for this failure is that innodb_trx_weight creates deadlocks and
3
leaves something like this in the SHOW ENGINE INNODB STATUS output:
5
------------------------
6
LATEST DETECTED DEADLOCK
7
------------------------
10
TRANSACTION 313, ACTIVE 0 sec, OS thread id 13644672 inserting
11
mysql tables in use 1, locked 1
12
LOCK WAIT 4 lock struct(s), heap size 488, 3 row lock(s)
13
MySQL thread id 3, query id 36 localhost root update
15
The regular expressions that partition_innodb is using are intended to extract
16
the lock structs and row locks numbers from another part of the output:
22
Purge done for trx's n:o < 0 undo n:o < 0
24
LIST OF TRANSACTIONS FOR EACH SESSION:
25
---TRANSACTION 0, not started, OS thread id 13645056
26
0 lock struct(s), heap size 488, 0 row lock(s)
27
MySQL thread id 8, query id 81 localhost root
29
In the InnoDB Plugin a transaction id is not printed as 2 consecutive
30
decimal integers (as it is in InnoDB 5.1) but rather as a single
31
hexadecimal integer. Thus the regular expressions somehow pick the wrong
32
part of the SHOW ENGINE INNODB STATUS output.
34
So after the regular expressions are adjusted to the InnoDB Plugin's variant
35
of trx_id prinout, then they pick the expected part of the output.
37
This patch cannot be proposed to MySQL because the failures occur only
38
in this tree and do not occur in the standard InnoDB 5.1.
40
--- mysql-test/t/partition_innodb.test 2008-11-14 22:51:17 +0000
41
+++ mysql-test/t/partition_innodb.test 2009-02-13 07:36:07 +0000
44
# grouping/referencing in replace_regex is very slow on long strings,
45
# removing all before/after the interesting row before grouping/referencing
46
---replace_regex /.*---TRANSACTION [0-9]+ [0-9]+, .*, OS thread id [0-9]+// /MySQL thread id [0-9]+, query id [0-9]+ .*// /.*([0-9]+ lock struct\(s\)), heap size [0-9]+, ([0-9]+ row lock\(s\)).*/\1 \2/
47
+--replace_regex /.*---TRANSACTION [0-9A-F]+, .*, OS thread id [0-9]+// /MySQL thread id [0-9]+, query id [0-9]+ .*// /.*([0-9]+ lock struct\(s\)), heap size [0-9]+, ([0-9]+ row lock\(s\)).*/\1 \2/
48
SHOW ENGINE InnoDB STATUS;
50
UPDATE t1 SET data = data*2 WHERE data = 2;
52
# grouping/referencing in replace_regex is very slow on long strings,
53
# removing all before/after the interesting row before grouping/referencing
54
---replace_regex /.*---TRANSACTION [0-9]+ [0-9]+, .*, OS thread id [0-9]+// /MySQL thread id [0-9]+, query id [0-9]+ .*// /.*([0-9]+ lock struct\(s\)), heap size [0-9]+, ([0-9]+ row lock\(s\)).*/\1 \2/
55
+--replace_regex /.*---TRANSACTION [0-9A-F]+, .*, OS thread id [0-9]+// /MySQL thread id [0-9]+, query id [0-9]+ .*// /.*([0-9]+ lock struct\(s\)), heap size [0-9]+, ([0-9]+ row lock\(s\)).*/\1 \2/
56
SHOW ENGINE InnoDB STATUS;
58
SET @@session.tx_isolation = @old_tx_isolation;