Commit 63f15064 authored by unknown's avatar unknown

log0recv.h, log0recv.c:

  Merge a log replay change required by ibbackup


innobase/log/log0recv.c:
  Merge a log replay change required by ibbackup
innobase/include/log0recv.h:
  Merge a log replay change required by ibbackup
parent 39403682
...@@ -15,6 +15,8 @@ Created 9/20/1997 Heikki Tuuri ...@@ -15,6 +15,8 @@ Created 9/20/1997 Heikki Tuuri
#include "hash0hash.h" #include "hash0hash.h"
#include "log0log.h" #include "log0log.h"
extern ibool recv_replay_file_ops;
/*********************************************************************** /***********************************************************************
Reads the checkpoint info needed in hot backup. */ Reads the checkpoint info needed in hot backup. */
......
...@@ -34,6 +34,11 @@ Created 9/20/1997 Heikki Tuuri ...@@ -34,6 +34,11 @@ Created 9/20/1997 Heikki Tuuri
#include "dict0boot.h" #include "dict0boot.h"
#include "fil0fil.h" #include "fil0fil.h"
/* This is set to FALSE if the backup was originally taken with the
ibbackup --include regexp option: then we do not want to create tables in
directories which were not included */
ibool recv_replay_file_ops = TRUE;
/* Log records are stored in the hash table in chunks at most of this size; /* Log records are stored in the hash table in chunks at most of this size;
this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */ this must be less than UNIV_PAGE_SIZE as it is stored in the buffer pool */
#define RECV_DATA_BLOCK_SIZE (MEM_MAX_ALLOC_IN_BUF - sizeof(recv_data_t)) #define RECV_DATA_BLOCK_SIZE (MEM_MAX_ALLOC_IN_BUF - sizeof(recv_data_t))
...@@ -1974,18 +1979,21 @@ loop: ...@@ -1974,18 +1979,21 @@ loop:
|| type == MLOG_FILE_RENAME || type == MLOG_FILE_RENAME
|| type == MLOG_FILE_DELETE)) { || type == MLOG_FILE_DELETE)) {
#ifdef UNIV_HOTBACKUP #ifdef UNIV_HOTBACKUP
/* In ibbackup --apply-log, replay an .ibd file if (recv_replay_file_ops) {
operation, if possible; note that
fil_path_to_mysql_datadir is set in ibbackup to /* In ibbackup --apply-log, replay an .ibd file
point to the datadir we should use there */ operation, if possible; note that
fil_path_to_mysql_datadir is set in ibbackup to
point to the datadir we should use there */
if (NULL == fil_op_log_parse_or_replay(body, end_ptr, if (NULL == fil_op_log_parse_or_replay(body,
type, TRUE, space)) { end_ptr, type, TRUE, space)) {
fprintf(stderr, fprintf(stderr,
"InnoDB: Error: file op log record of type %lu space %lu not complete in\n" "InnoDB: Error: file op log record of type %lu space %lu not complete in\n"
"InnoDB: the replay phase. Path %s\n", (ulint)type, space, (char*)(body + 2)); "InnoDB: the replay phase. Path %s\n", (ulint)type, space, (char*)(body + 2));
ut_a(0); ut_a(0);
}
} }
#endif #endif
/* In normal mysqld crash recovery we do not try to /* In normal mysqld crash recovery we do not try to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment