Skip to content

Commit

Permalink
Merge branch 'merge/merge-xtradb-5.5' into 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Aug 3, 2016
2 parents 19fe10c + e316c46 commit 5265243
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 21 deletions.
4 changes: 2 additions & 2 deletions storage/xtradb/include/log0online.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*****************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion storage/xtradb/include/univ.i
Original file line number Diff line number Diff line change
Expand Up @@ -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 "5.5.49-MariaDB-" IB_TO_STR(PERCONA_INNODB_VERSION)
Expand Down
4 changes: 2 additions & 2 deletions storage/xtradb/log/log0online.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*****************************************************************************/

Expand Down
46 changes: 30 additions & 16 deletions storage/xtradb/log/log0recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,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 */
Expand All @@ -692,8 +693,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) {

Expand Down Expand Up @@ -2989,7 +3019,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;
Expand Down Expand Up @@ -3092,21 +3121,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);

Expand Down

0 comments on commit 5265243

Please sign in to comment.