mariadb/storage/innobase/include
Marko Mäkelä 1a0dde9206 Bug #11766513 - 59641: Prepared XA transaction in system after hard crash
causes future shutdown hang

InnoDB would hang on shutdown if any XA transactions exist in the
system in the PREPARED state. This has been masked by the fact that
MySQL would roll back any PREPARED transaction on shutdown, in the
spirit of Bug #12161 Xa recovery and client disconnection.

[mysql-test-run] do_shutdown_server: Interpret --shutdown_server 0 as
a request to kill the server immediately without initiating a
shutdown procedure.

xid_cache_insert(): Initialize XID_STATE::rm_error in order to avoid a
bogus error message on XA ROLLBACK of a recovered PREPARED transaction.

innobase_commit_by_xid(), innobase_rollback_by_xid(): Free the InnoDB
transaction object after rolling back a PREPARED transaction.

trx_get_trx_by_xid(): Only consider transactions whose
trx->is_prepared flag is set. The MySQL layer seems to prevent
attempts to roll back connected transactions that are in the PREPARED
state from another connection, but it is better to play it safe. The
is_prepared flag was introduced in the InnoDB Plugin.

trx_n_prepared: A new counter, counting the number of InnoDB
transactions in the PREPARED state.

logs_empty_and_mark_files_at_shutdown(): On shutdown, allow
trx_n_prepared transactions to exist in the system.

trx_undo_free_prepared(), trx_free_prepared(): New functions, to free
the memory objects of PREPARED transactions on shutdown. This is not
needed in the built-in InnoDB, because it would collect all allocated
memory on shutdown. The InnoDB Plugin needs this because of
innodb_use_sys_malloc.

trx_sys_close(): Invoke trx_free_prepared() on all remaining
transactions.
2011-04-07 21:12:54 +03:00
..
btr0btr.h Applied innodb-5.1-ss1004 2006-11-09 05:01:19 +01:00
btr0btr.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
btr0cur.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
btr0cur.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
btr0pcur.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
btr0pcur.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
btr0sea.h Complete application of InnoDB snapshot innodb-5.1-ss2545. 2008-12-14 12:25:33 -07:00
btr0sea.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
btr0types.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
buf0buf.h Cherry-pick some changes from innodb-5.1-ss2479 snapshot. Includes fixes for 2008-08-19 18:37:41 -06:00
buf0buf.ic (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message 2011-01-06 09:05:45 +02:00
buf0flu.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
buf0flu.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
buf0lru.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
buf0lru.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
buf0rea.h Applying InnoDB snapshot, fixes BUG#38901 2010-02-26 13:03:58 +04:00
buf0types.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
data0data.h Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
data0data.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
data0type.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
data0type.ic Applying InnoDB snapshot innodb-5.1-ss3603 2009-01-12 23:27:11 +01:00
data0types.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
db0err.h Merge from mysql-5.1-bugteam to mysql-5.1-security 2010-09-01 17:43:02 -07:00
dict0boot.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
dict0boot.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
dict0crea.h Applied innodb-5.1-ss1004 2006-11-09 05:01:19 +01:00
dict0crea.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
dict0dict.h This is to resolve a hang situation in 5.1 builtin raised by 2010-08-24 20:42:33 -07:00
dict0dict.ic This is to resolve a hang situation in 5.1 builtin raised by 2010-08-24 20:42:33 -07:00
dict0load.h Fix Bug #54582 stack overflow when opening many tables linked with 2010-08-04 03:11:33 -07:00
dict0load.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
dict0mem.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
dict0mem.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
dict0types.h Non-functional changes. 2011-01-17 14:06:48 +02:00
dyn0dyn.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
dyn0dyn.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
eval0eval.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
eval0eval.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
eval0proc.h Applied innodb-5.1-ss475 snapshot. 2006-04-23 12:48:31 +04:00
eval0proc.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
fil0fil.h Fix Bug #54538 - use of exclusive innodb dictionary lock limits performance. 2010-08-20 17:49:43 +10:00
fsp0fsp.h Applying InnoDB snashot 5.1-ss5282, PRE-Fix for BUG#45097 2009-06-11 18:21:54 +05:30
fsp0fsp.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
fsp0types.h Applying InnoDB snashot 5.1-ss5282, PRE-Fix for BUG#45097 2009-06-11 18:21:54 +05:30
fut0fut.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
fut0fut.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
fut0lst.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
fut0lst.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
ha0ha.h Applied innodb-5.1-ss1039 and innodb-5.1-ss1134 snapshots. 2007-01-04 19:51:34 -07:00
ha0ha.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
ha_prototypes.h Applying InnoDB snapshot 5.1-ss6242, part 1. Fixes BUG#32430 2009-11-30 13:56:45 +05:30
hash0hash.h Merge mysql.com:/home/kent/bk/tmp2/mysql-5.0-build 2007-01-15 10:37:27 +01:00
hash0hash.ic Applying InnoDB snapshot innodb-5.1-ss3603 2009-01-12 23:32:50 +01:00
ibuf0ibuf.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
ibuf0ibuf.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
ibuf0types.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
lock0iter.h Apply snapshot innodb-51-ss1644: Part #2. 2007-07-25 13:29:57 -06:00
lock0lock.h Bug#53674: InnoDB: Error: unlock row could not find a 4 mode lock on the record 2010-06-02 13:26:37 +03:00
lock0lock.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
lock0priv.h Apply snapshot innodb-51-ss1644: Part #2. 2007-07-25 13:29:57 -06:00
lock0priv.ic Apply snapshot innodb-51-ss1644: Part #2. 2007-07-25 13:29:57 -06:00
lock0types.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
log0log.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
log0log.ic Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
log0recv.h Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
log0recv.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
mach0data.h Applying InnoDB snapshot 5.1-ss6242, part 7. Fixes BUG#49032 2009-11-30 15:11:38 +05:30
mach0data.ic Make UNIV_DEBUG Valgrind friendly in the built-in InnoDB. 2010-05-19 11:16:18 +03:00
mem0dbg.h Apply snapshot innodb-5.1-ss1989 2007-11-06 15:42:58 -07:00
mem0dbg.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
mem0mem.h Merge r6103 from InnoDB Plugin to the built-in InnoDB to fix Bug #53202: 2010-04-28 08:33:25 +02:00
mem0mem.ic Merge r6103 from InnoDB Plugin to the built-in InnoDB to fix Bug #53202: 2010-04-28 08:33:25 +02:00
mem0pool.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
mem0pool.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
mtr0log.h Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-06-21 08:49:21 +02:00
mtr0log.ic Applying InnoDB snashot 5.1-ss5282, Fix for BUG#45097 2009-06-11 18:35:12 +05:30
mtr0mtr.h Applying InnoDB snapshot 5.1-ss6344, part 2. Fixes BUG#41609 but does 2009-12-21 15:50:32 +05:30
mtr0mtr.ic Apply InnoDB snapshot ss923 2006-10-20 12:36:15 -06:00
mtr0types.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
os0file.h Applying InnoDB snapshot 5.1-ss6242, part 2. Fixes BUG#3139 2009-11-30 14:10:31 +05:30
os0proc.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
os0proc.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
os0sync.h Applied InnoDB snapshot innodb-5.1-ss2298 2008-02-19 09:44:09 -07:00
os0sync.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
os0thread.h Applied innodb-5.1-ss492 snapshot. 2006-04-26 08:30:37 +04:00
os0thread.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
page0cur.h Applied InnoDB snapshot innodb-5.1-ss2093 2007-11-20 12:23:18 -07:00
page0cur.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
page0page.h Apply snapshot innodb-51-ss1644 2007-07-24 19:34:31 -06:00
page0page.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
page0types.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
pars0grm.h Applied innodb-5.1-ss660 snapshot. 2006-07-26 13:28:51 +04:00
pars0opt.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
pars0opt.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
pars0pars.h Bug#29125 Windows Server X64: so many compiler warnings 2009-02-13 11:41:47 -05:00
pars0pars.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
pars0sym.h Applied innodb-5.1-ss594 snapshot. 2006-06-01 10:34:04 +04:00
pars0sym.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
pars0types.h Applied innodb-5.1-ss594 snapshot. 2006-06-01 10:34:04 +04:00
que0que.h Fix Bug #54582 stack overflow when opening many tables linked with 2010-08-04 03:11:33 -07:00
que0que.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
que0types.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
read0read.h Applied InnoDB snapshot innodb-5.1-ss2298 2008-02-19 09:44:09 -07:00
read0read.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
read0types.h Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.0 2005-08-05 18:01:34 -04:00
rem0cmp.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
rem0cmp.ic Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
rem0rec.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
rem0rec.ic Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
rem0types.h Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
row0ins.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
row0ins.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
row0mysql.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
row0mysql.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
row0purge.h Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
row0purge.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
row0row.h Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
row0row.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
row0sel.h Apply innodb-5.1-ss2360 snapshot 2008-03-27 02:40:45 +01:00
row0sel.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
row0types.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
row0uins.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
row0uins.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
row0umod.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
row0umod.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
row0undo.h Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
row0undo.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
row0upd.h Bug #56680 wrong InnoDB results from a case-insensitive covering index 2010-10-19 08:58:53 +03:00
row0upd.ic Applied innodb-5.1 snapshots ss799 and ss854 2006-09-21 01:39:09 -06:00
row0vers.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
row0vers.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
srv0que.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
srv0srv.h Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad 2011-01-14 09:02:28 -08:00
srv0srv.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
srv0start.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
sync0arr.h Bug#11877216 InnoDB too eager to commit suicide on a busy server 2011-03-30 14:25:58 +03:00
sync0arr.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
sync0rw.h Bug#59579 rw_lock_debug_print outputs to stderr 2011-01-18 12:25:13 +02:00
sync0rw.ic Applied InnoDB snapshot innodb-5.1-ss2298 2008-02-19 09:44:09 -07:00
sync0sync.h Fix bug#54583. This change reverses rsvn:1350 by getting rid of a bogus assertion 2010-06-25 18:18:41 +10:00
sync0sync.ic Apply InnoDB snapshot innodb-5.1-ss2858, part 3. 2008-12-14 13:27:13 -07:00
sync0types.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
thr0loc.h Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
thr0loc.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
trx0purge.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
trx0purge.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
trx0rec.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
trx0rec.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
trx0roll.h Applying InnoDB snashot 5.1-ss3931, part 1. Fixes 2009-03-02 18:06:44 -07:00
trx0roll.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
trx0rseg.h Non-functional changes. 2011-01-17 14:06:48 +02:00
trx0rseg.ic Applying InnoDB snashot 5.1-ss5343, Fixes BUG#45357 2009-06-22 16:58:00 +05:30
trx0sys.h Applying InnoDB snashot 5.1-ss5282, Fix for BUG#45097 2009-06-11 18:35:12 +05:30
trx0sys.ic Merge from innodb-branches-5.1 2010-04-07 21:59:02 +03:00
trx0trx.h Bug #11766513 - 59641: Prepared XA transaction in system after hard crash 2011-04-07 21:12:54 +03:00
trx0trx.ic Applying InnoDB snashot 5.1-ss4699, part 1. Fixes BUG#39320 and other 2009-04-15 17:16:08 +05:30
trx0types.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
trx0undo.h apply snapshot innodb-5.1-ss2387 2008-03-27 15:13:10 +01:00
trx0undo.ic Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
trx0xa.h Applied InnoDB 5.1 snapshot ss787. 2006-09-05 03:52:15 +02:00
univ.i Fix Bug #54538 - use of exclusive innodb dictionary lock limits performance. 2010-08-20 17:49:43 +10:00
usr0sess.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
usr0sess.ic Changes to create storage directory for storage engines. 2005-04-26 18:19:54 -07:00
usr0types.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
ut0byte.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
ut0byte.ic Fixed compiler warnings 2007-02-23 13:13:55 +02:00
ut0dbg.h Bug#45288: pb2 returns a lot of compilation warnings 2010-10-19 14:48:03 -02:00
ut0list.h Applied innodb-5.1-ss594 snapshot. 2006-06-01 10:34:04 +04:00
ut0list.ic Applied innodb-5.1-ss594 snapshot. 2006-06-01 10:34:04 +04:00
ut0lst.h Apply the following InnoDB snapshots: 2007-03-22 15:59:35 -06:00
ut0mem.h Apply InnoDB snapshot innodb-5.1-ss1726. 2007-08-24 19:14:52 -06:00
ut0mem.ic Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
ut0rnd.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
ut0rnd.ic (partially) Fix Bug#55227 Fix compiler warnings in innodb with gcc 4.6 2010-09-13 16:33:25 +03:00
ut0sort.h Applied innodb-5.1-ss269 snapshot. 2006-03-10 19:22:21 +03:00
ut0ut.h Complete application of InnoDB snapshot innodb-5.1-ss2485, part 1. Fixes 2008-12-14 12:18:59 -07:00
ut0ut.ic Fixed compiler warnings 2007-02-23 13:13:55 +02:00
ut0vec.h Applied innodb-5.1-ss475 snapshot. 2006-04-23 12:48:31 +04:00
ut0vec.ic Applied innodb-5.1-ss475 snapshot. 2006-04-23 12:48:31 +04:00
ut0wqueue.h Applied innodb-5.1-ss594 snapshot. 2006-06-01 10:34:04 +04:00