summaryrefslogtreecommitdiff
path: root/storage/xtradb/trx
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2013-09-03 17:50:36 +0300
committerJan Lindström <jplindst@mariadb.org>2013-09-03 17:50:36 +0300
commitba3ff50ab2bfabab6a4307282f92854f6efe6382 (patch)
tree904c9b94cc5f1dfa8727f17af56f50fba4155205 /storage/xtradb/trx
parent81739d308fee0317e56bd70d97e3429ece83dd4b (diff)
parentc8b87ca16f05826c6801c70fb20a88a61959264e (diff)
downloadmariadb-git-ba3ff50ab2bfabab6a4307282f92854f6efe6382.tar.gz
Merge 10.0 to galera-10.0
Diffstat (limited to 'storage/xtradb/trx')
-rw-r--r--storage/xtradb/trx/trx0sys.c4
-rw-r--r--storage/xtradb/trx/trx0trx.c19
2 files changed, 19 insertions, 4 deletions
diff --git a/storage/xtradb/trx/trx0sys.c b/storage/xtradb/trx/trx0sys.c
index 975e0caed60..a5eff4852dc 100644
--- a/storage/xtradb/trx/trx0sys.c
+++ b/storage/xtradb/trx/trx0sys.c
@@ -144,7 +144,7 @@ UNIV_INTERN mysql_pfs_key_t file_format_max_mutex_key;
#ifndef UNIV_HOTBACKUP
#ifdef UNIV_DEBUG
/* Flag to control TRX_RSEG_N_SLOTS behavior debugging. */
-uint trx_rseg_n_slots_debug = 0;
+UNIV_INTERN uint trx_rseg_n_slots_debug = 0;
#endif
/** This is used to track the maximum file format id known to InnoDB. It's
@@ -1411,6 +1411,8 @@ trx_sys_init_at_db_start(void)
TRX_DESCR_ARRAY_INITIAL_SIZE);
trx_sys->descr_n_max = TRX_DESCR_ARRAY_INITIAL_SIZE;
trx_sys->descr_n_used = 0;
+ srv_descriptors_memory = TRX_DESCR_ARRAY_INITIAL_SIZE *
+ sizeof(trx_id_t);
sys_header = trx_sysf_get(&mtr);
diff --git a/storage/xtradb/trx/trx0trx.c b/storage/xtradb/trx/trx0trx.c
index 77ec043098a..fa703b61f69 100644
--- a/storage/xtradb/trx/trx0trx.c
+++ b/storage/xtradb/trx/trx0trx.c
@@ -135,6 +135,7 @@ trx_reserve_descriptor(
n_max * sizeof(trx_id_t));
trx_sys->descr_n_max = n_max;
+ srv_descriptors_memory = n_max * sizeof(trx_id_t);
}
descr = trx_sys->descriptors + n_used - 1;
@@ -219,7 +220,7 @@ trx_create(
ut_ad(mutex_own(&kernel_mutex));
ut_ad(sess);
- trx = mem_alloc(sizeof(trx_t));
+ trx = ut_malloc(sizeof(trx_t));
trx->magic_n = TRX_MAGIC_N;
@@ -490,7 +491,7 @@ trx_free(
trx_release_descriptor(trx);
- mem_free(trx);
+ ut_free(trx);
}
/********************************************************************//**
@@ -548,7 +549,7 @@ trx_free_prepared(
ut_ad(trx_sys->descr_n_used <= UT_LIST_GET_LEN(trx_sys->trx_list));
- mem_free(trx);
+ ut_free(trx);
}
/********************************************************************//**
@@ -1107,6 +1108,18 @@ trx_write_serialisation_history(
trx->mysql_master_log_pos,
TRX_SYS_COMMIT_MASTER_LOG_INFO, &mtr);
+ trx_sys_update_mysql_binlog_offset(
+ sys_header,
+ trx->mysql_relay_log_file_name,
+ trx->mysql_relay_log_pos,
+ TRX_SYS_MYSQL_RELAY_LOG_INFO, &mtr);
+
+ trx_sys_update_mysql_binlog_offset(
+ sys_header,
+ trx->mysql_master_log_file_name,
+ trx->mysql_master_log_pos,
+ TRX_SYS_MYSQL_MASTER_LOG_INFO, &mtr);
+
trx->mysql_master_log_file_name = "";
}