mariadb/client
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
..
.cvsignore
client_priv.h WL#5182 Remove more deprecated 4.1/5.0 features 2010-01-27 13:23:28 +01:00
CMakeLists.txt Addition to Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled 2009-09-04 11:19:44 +05:30
completion_hash.cc
completion_hash.h - Added/updated copyright headers 2010-12-28 19:57:23 +01:00
echo.c
get_password.c fixes for build failures due to my yesterday's changeset forbidding 2008-02-19 18:45:11 +01:00
Makefile.am Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 2009-09-03 16:02:03 +05:30
my_readline.h Fixed bug#57450 - mysql client enter in an infinite loop 2011-02-05 11:02:00 +06:00
mysql.cc Follow up fix for bug#57450. 2011-02-09 12:46:12 +06:00
mysql_upgrade.c Bug#45288: pb2 returns a lot of compilation warnings on linux 2010-07-20 15:07:36 -03:00
mysqladmin.cc Bug#58221 : mysqladmin --sleep=x --count=x keeps looping 2011-01-16 02:04:08 +05:30
mysqlbinlog.cc BUG#11766427, BUG#59539: Filter by server id in mysqlbinlog fails 2011-03-25 15:16:13 +01:00
mysqlcheck.c Bug#45288: pb2 returns a lot of compilation warnings on linux 2010-07-09 09:00:17 -03:00
mysqldump.c Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH 2011-02-21 12:37:24 +05:30
mysqlimport.c Bug#42733: Type-punning warnings when compiling MySQL -- 2010-06-10 17:16:43 -03:00
mysqlshow.c Use UNINIT_VAR workaround instead of LINT_INIT. 2010-07-09 16:37:52 -03:00
mysqlslap.c Bug#59109 : mysqlslap crashes on mysql_fetch_row after ignoring 2011-01-13 15:56:42 +05:30
mysqltest.cc Bug #11766513 - 59641: Prepared XA transaction in system after hard crash 2011-04-07 21:12:54 +03:00
readline.cc Follow up fix for bug#57450. 2011-02-09 17:13:17 +06:00
sql_string.cc Bug#45288: pb2 returns a lot of compilation warnings on linux 2010-07-09 09:00:17 -03:00
sql_string.h Bug#45288: pb2 returns a lot of compilation warnings 2010-10-19 20:36:59 -02:00