summaryrefslogtreecommitdiff
path: root/sql/mysqld.h
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2012-06-22 11:46:28 +0200
committerunknown <knielsen@knielsen-hq.org>2012-06-22 11:46:28 +0200
commit0697ee265fa4fe4d617dc96194fcf2532fd73402 (patch)
tree2da975668ffb4a36601eccb1b852a10dc9650bca /sql/mysqld.h
parent9fe317ffd6e3545e7896389641b74c2977a5e4b4 (diff)
downloadmariadb-git-0697ee265fa4fe4d617dc96194fcf2532fd73402.tar.gz
MDEV-181: XID crash recovery across binlog boundaries
Keep track of how many pending XIDs (transactions that are prepared in storage engine and written into binlog, but not yet durably committed on disk in the engine) there are in each binlog. When the count of one binlog drops to zero, write a new binlog checkpoint event, telling which is the oldest binlog with pending XIDs. When doing XA recovery after a crash, check the last binlog checkpoint event, and scan all binlog files from that point onwards for XIDs that must be committed if found in prepared state inside engine. Remove the code in binlog rotation that waits for all prepared XIDs to be committed before writing a new binlog file (this is no longer necessary when recovery can scan multiple binlog files).
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r--sql/mysqld.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h
index 56419acdcd4..28c4d771a48 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -225,7 +225,7 @@ extern PSI_mutex_key key_PAGE_lock, key_LOCK_sync, key_LOCK_active,
extern PSI_mutex_key key_LOCK_des_key_file;
#endif
-extern PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_prep_xids,
+extern PSI_mutex_key key_BINLOG_LOCK_index, key_BINLOG_LOCK_xid_list,
key_delayed_insert_mutex, key_hash_filo_lock, key_LOCK_active_mi,
key_LOCK_connection_count, key_LOCK_crypt, key_LOCK_delayed_create,
key_LOCK_delayed_insert, key_LOCK_delayed_status, key_LOCK_error_log,
@@ -256,7 +256,7 @@ extern PSI_rwlock_key key_rwlock_LOCK_grant, key_rwlock_LOCK_logger,
extern PSI_cond_key key_PAGE_cond, key_COND_active, key_COND_pool;
#endif /* HAVE_MMAP */
-extern PSI_cond_key key_BINLOG_COND_prep_xids, key_BINLOG_update_cond,
+extern PSI_cond_key key_BINLOG_COND_xid_list, key_BINLOG_update_cond,
key_COND_cache_status_changed, key_COND_manager,
key_COND_rpl_status, key_COND_server_started,
key_delayed_insert_cond, key_delayed_insert_cond_client,