diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-16 19:30:39 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-16 19:30:39 +0200 |
commit | a5b534a08e5c666da6f1e909e24e40f5d6d626c0 (patch) | |
tree | 401798af6dda2e1952d57c5f91296348bd10293e /storage/xtradb/trx | |
parent | 005c7e54214546584c8dc67a746e215f8dbe4b58 (diff) | |
parent | 6bd24f07d4357d32a4bc7208654dc8bd0df30b76 (diff) | |
download | mariadb-git-a5b534a08e5c666da6f1e909e24e40f5d6d626c0.tar.gz |
merge Percona-Server-5.5.32-rel31.0.tar.gz
Diffstat (limited to 'storage/xtradb/trx')
-rw-r--r-- | storage/xtradb/trx/trx0sys.c | 12 | ||||
-rw-r--r-- | storage/xtradb/trx/trx0trx.c | 19 |
2 files changed, 24 insertions, 7 deletions
diff --git a/storage/xtradb/trx/trx0sys.c b/storage/xtradb/trx/trx0sys.c index 2c44cee60fe..a56e55c0e19 100644 --- a/storage/xtradb/trx/trx0sys.c +++ b/storage/xtradb/trx/trx0sys.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -140,7 +140,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 @@ -726,7 +726,8 @@ trx_sys_doublewrite_init_or_restore_pages( /* Check if the page is corrupt */ if (UNIV_UNLIKELY - (buf_page_is_corrupted(read_buf, zip_size))) { + (buf_page_is_corrupted( + TRUE, read_buf, zip_size))) { fprintf(stderr, "InnoDB: Warning: database page" @@ -737,7 +738,8 @@ trx_sys_doublewrite_init_or_restore_pages( " the doublewrite buffer.\n", (ulong) space_id, (ulong) page_no); - if (buf_page_is_corrupted(page, zip_size)) { + if (buf_page_is_corrupted( + TRUE, page, zip_size)) { fprintf(stderr, "InnoDB: Dump of the page:\n"); buf_page_print( @@ -1324,6 +1326,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 e70bc5ff0d1..8b7748b6c2f 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; @@ -487,7 +488,7 @@ trx_free( trx_release_descriptor(trx); - mem_free(trx); + ut_free(trx); } /********************************************************************//** @@ -545,7 +546,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); } /********************************************************************//** @@ -1091,6 +1092,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 = ""; } |