~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/innobase/mysql-test/patches/partition_innodb.diff

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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:
4
 
 
5
 
  ------------------------
6
 
  LATEST DETECTED DEADLOCK
7
 
  ------------------------
8
 
  090213 10:26:25
9
 
  *** (1) TRANSACTION:
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
14
 
 
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:
17
 
 
18
 
  ------------
19
 
  TRANSACTIONS
20
 
  ------------
21
 
  Trx id counter 31D
22
 
  Purge done for trx's n:o < 0 undo n:o < 0
23
 
  History list length 4
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
28
 
 
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.
33
 
 
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.
36
 
 
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.
39
 
 
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
42
 
@@ -27,14 +27,14 @@
43
 
 
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;
49
 
 
50
 
 UPDATE t1 SET data = data*2 WHERE data = 2;
51
 
 
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;
57
 
 
58
 
 SET @@session.tx_isolation = @old_tx_isolation;
59