diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/xtradb/include/log0online.h | 4 | ||||
-rw-r--r-- | storage/xtradb/include/univ.i | 2 | ||||
-rw-r--r-- | storage/xtradb/log/log0online.c | 4 | ||||
-rw-r--r-- | storage/xtradb/log/log0recv.c | 46 |
4 files changed, 35 insertions, 21 deletions
diff --git a/storage/xtradb/include/log0online.h b/storage/xtradb/include/log0online.h index a20eef57d7a..02d75001505 100644 --- a/storage/xtradb/include/log0online.h +++ b/storage/xtradb/include/log0online.h @@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA +this program; if not, write to the Free Software Foundation, Inc., 51 Franklin +Street, Fifth Floor, Boston, MA 02110-1301, USA *****************************************************************************/ diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i index d5ec85ce995..b158a12027f 100644 --- a/storage/xtradb/include/univ.i +++ b/storage/xtradb/include/univ.i @@ -64,7 +64,7 @@ component, i.e. we show M.N.P as M.N */ (INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR) #ifndef PERCONA_INNODB_VERSION -#define PERCONA_INNODB_VERSION 37.9 +#define PERCONA_INNODB_VERSION 38.0 #endif #define INNODB_VERSION_STR MYSQL_SERVER_VERSION diff --git a/storage/xtradb/log/log0online.c b/storage/xtradb/log/log0online.c index a8444199ea9..d0127488f67 100644 --- a/storage/xtradb/log/log0online.c +++ b/storage/xtradb/log/log0online.c @@ -11,8 +11,8 @@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 59 Temple -Place, Suite 330, Boston, MA 02111-1307 USA +this program; if not, write to the Free Software Foundation, Inc., 51 Franklin +Street, Fifth Floor, Boston, MA 02110-1301, USA *****************************************************************************/ diff --git a/storage/xtradb/log/log0recv.c b/storage/xtradb/log/log0recv.c index 3429361c74c..6c2a121967e 100644 --- a/storage/xtradb/log/log0recv.c +++ b/storage/xtradb/log/log0recv.c @@ -659,6 +659,7 @@ recv_check_cp_is_consistent( } #ifndef UNIV_HOTBACKUP + /********************************************************//** Looks for the maximum consistent checkpoint from the log groups. @return error code or DB_SUCCESS */ @@ -685,8 +686,37 @@ recv_find_max_checkpoint( buf = log_sys->checkpoint_buf; while (group) { + + ulint log_hdr_log_block_size; + group->state = LOG_GROUP_CORRUPTED; + /* Assert that we can reuse log_sys->checkpoint_buf to read the + part of the header that contains the log block size. */ + ut_ad(LOG_FILE_OS_FILE_LOG_BLOCK_SIZE + 4 + < OS_FILE_LOG_BLOCK_SIZE); + + fil_io(OS_FILE_READ | OS_FILE_LOG, TRUE, group->space_id, 0, + 0, 0, OS_FILE_LOG_BLOCK_SIZE, + log_sys->checkpoint_buf, NULL); + log_hdr_log_block_size + = mach_read_from_4(log_sys->checkpoint_buf + + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE); + if (log_hdr_log_block_size == 0) { + /* 0 means default value */ + log_hdr_log_block_size = 512; + } + if (log_hdr_log_block_size != srv_log_block_size) { + fprintf(stderr, + "InnoDB: Error: The block size of ib_logfile " + "%lu is not equal to innodb_log_block_size " + "%lu.\n" + "InnoDB: Error: Suggestion - Recreate log " + "files.\n", + log_hdr_log_block_size, srv_log_block_size); + return(DB_ERROR); + } + for (field = LOG_CHECKPOINT_1; field <= LOG_CHECKPOINT_2; field += LOG_CHECKPOINT_2 - LOG_CHECKPOINT_1) { @@ -2982,7 +3012,6 @@ recv_recovery_from_checkpoint_start_func( log_group_t* max_cp_group; log_group_t* up_to_date_group; ulint max_cp_field; - ulint log_hdr_log_block_size; ib_uint64_t checkpoint_lsn; ib_uint64_t checkpoint_no; ib_uint64_t old_scanned_lsn; @@ -3085,21 +3114,6 @@ recv_recovery_from_checkpoint_start_func( log_hdr_buf, max_cp_group); } - log_hdr_log_block_size - = mach_read_from_4(log_hdr_buf + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE); - if (log_hdr_log_block_size == 0) { - /* 0 means default value */ - log_hdr_log_block_size = 512; - } - if (log_hdr_log_block_size != srv_log_block_size) { - fprintf(stderr, - "InnoDB: Error: The block size of ib_logfile (%lu) " - "is not equal to innodb_log_block_size.\n" - "InnoDB: Error: Suggestion - Recreate log files.\n", - log_hdr_log_block_size); - return(DB_ERROR); - } - #ifdef UNIV_LOG_ARCHIVE group = UT_LIST_GET_FIRST(log_sys->log_groups); |