summaryrefslogtreecommitdiff
path: root/storage/xtradb/trx/trx0sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/trx/trx0sys.c')
-rw-r--r--storage/xtradb/trx/trx0sys.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/storage/xtradb/trx/trx0sys.c b/storage/xtradb/trx/trx0sys.c
index 59b7da4083d..975e0caed60 100644
--- a/storage/xtradb/trx/trx0sys.c
+++ b/storage/xtradb/trx/trx0sys.c
@@ -1406,6 +1406,12 @@ trx_sys_init_at_db_start(void)
trx_sys = mem_zalloc(sizeof(*trx_sys));
+ /* Allocate the trx descriptors array */
+ trx_sys->descriptors = ut_malloc(sizeof(trx_id_t) *
+ TRX_DESCR_ARRAY_INITIAL_SIZE);
+ trx_sys->descr_n_max = TRX_DESCR_ARRAY_INITIAL_SIZE;
+ trx_sys->descr_n_used = 0;
+
sys_header = trx_sysf_get(&mtr);
trx_rseg_list_and_array_init(sys_header, ib_bh, &mtr);
@@ -1433,7 +1439,7 @@ trx_sys_init_at_db_start(void)
for (;;) {
- if (trx->conc_state != TRX_PREPARED) {
+ if (trx->state != TRX_PREPARED) {
rows_to_undo += trx->undo_no;
}
@@ -2115,6 +2121,9 @@ trx_sys_close(void)
ut_a(UT_LIST_GET_LEN(trx_sys->view_list) == 0);
ut_a(UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0);
+ ut_ad(trx_sys->descr_n_used == 0);
+ ut_free(trx_sys->descriptors);
+
mem_free(trx_sys);
trx_sys = NULL;