mariadb/mysql-test/suite
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
..
binlog Bug #11762804 55442: MYSQLD DEBUG CRASHES WHILE RUNNING MYISAM_CRASH_BEFORE_FLUSH_KEYS.TEST 2011-03-15 16:06:59 +01:00
bugs BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
engines Bug#11766165 - 59211: SELECT RETURNS DIFFERENT VALUE FOR MIN(YEAR) FUNCTION 2011-03-01 21:26:24 +05:30
federated Bug#35333, "If Federated table can't connect to remote host, can't retrieve 2010-11-29 22:46:43 -06:00
funcs_1 Bug#11766500 - 59624: FUNCS_1 SUITE TESTS FAILING WITH RESULT DIFFERENCE WHEN RUN USING EMBEDDED MODE 2011-03-18 16:35:57 +05:30
funcs_2 merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00
im
innodb Bug #11766513 - 59641: Prepared XA transaction in system after hard crash 2011-04-07 21:12:54 +03:00
innodb_plugin Bug #11766513 - 59641: Prepared XA transaction in system after hard crash 2011-04-07 21:12:54 +03:00
jp Bug #45159 : some tests in suite "jp" fail in embedded server (use LOAD DATA) 2009-09-11 15:52:08 +03:00
large_tests
manual BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
ndb Bug#57924: crash when creating partitioned table with 2011-01-10 16:20:28 +01:00
ndb_team BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
parts Bug#59418: parts suite have several failures with --embedded-server 2011-01-18 23:55:39 +01:00
rpl merge 2011-03-25 14:57:25 +02:00
rpl_ndb BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars Merge from mysql-5.1.55-release 2011-02-08 12:52:33 +01:00