mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Revert "Prepare XtraDB to be used with xtrabackup."
This reverts commit de5646f1a9
.
This commit is contained in:
@@ -77,12 +77,6 @@ IF(SSL_DEFINES)
|
|||||||
ADD_DEFINITIONS(${SSL_DEFINES})
|
ADD_DEFINITIONS(${SSL_DEFINES})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32)
|
|
||||||
SET(NT_SERVICE_SOURCES nt_servc.cc nt_servc.h )
|
|
||||||
ELSE()
|
|
||||||
SET(NT_SERVICE_SOURCES)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
SET (SQL_SOURCE
|
SET (SQL_SOURCE
|
||||||
../sql-common/client.c compat56.cc derror.cc des_key_file.cc
|
../sql-common/client.c compat56.cc derror.cc des_key_file.cc
|
||||||
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
|
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
|
||||||
@@ -149,7 +143,6 @@ SET (SQL_SOURCE
|
|||||||
${GEN_SOURCES}
|
${GEN_SOURCES}
|
||||||
${GEN_DIGEST_SOURCES}
|
${GEN_DIGEST_SOURCES}
|
||||||
${MYSYS_LIBWRAP_SOURCE}
|
${MYSYS_LIBWRAP_SOURCE}
|
||||||
${NT_SERVICE_SOURCES}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
|
IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
|
||||||
@@ -179,7 +172,7 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
|
|||||||
${LIBSYSTEMD})
|
${LIBSYSTEMD})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(MYSQLD_SOURCE main.cc message.rc)
|
SET(MYSQLD_SOURCE main.cc nt_servc.cc nt_servc.h message.rc)
|
||||||
TARGET_LINK_LIBRARIES(sql psapi)
|
TARGET_LINK_LIBRARIES(sql psapi)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
|
SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
|
||||||
|
@@ -722,7 +722,7 @@ btr_root_fseg_validate(
|
|||||||
/**************************************************************//**
|
/**************************************************************//**
|
||||||
Gets the root node of a tree and x- or s-latches it.
|
Gets the root node of a tree and x- or s-latches it.
|
||||||
@return root page, x- or s-latched */
|
@return root page, x- or s-latched */
|
||||||
|
static
|
||||||
buf_block_t*
|
buf_block_t*
|
||||||
btr_root_block_get(
|
btr_root_block_get(
|
||||||
/*===============*/
|
/*===============*/
|
||||||
@@ -1531,7 +1531,7 @@ btr_node_ptr_set_child_page_no(
|
|||||||
/************************************************************//**
|
/************************************************************//**
|
||||||
Returns the child page of a node pointer and x-latches it.
|
Returns the child page of a node pointer and x-latches it.
|
||||||
@return child page, x-latched */
|
@return child page, x-latched */
|
||||||
|
static
|
||||||
buf_block_t*
|
buf_block_t*
|
||||||
btr_node_ptr_get_child(
|
btr_node_ptr_get_child(
|
||||||
/*===================*/
|
/*===================*/
|
||||||
|
@@ -379,6 +379,7 @@ fil_node_get_space_id(
|
|||||||
|
|
||||||
/*******************************************************************//**
|
/*******************************************************************//**
|
||||||
Returns the table space by a given name, NULL if not found. */
|
Returns the table space by a given name, NULL if not found. */
|
||||||
|
UNIV_INLINE
|
||||||
fil_space_t*
|
fil_space_t*
|
||||||
fil_space_get_by_name(
|
fil_space_get_by_name(
|
||||||
/*==================*/
|
/*==================*/
|
||||||
@@ -4784,7 +4785,7 @@ directory. We retry 100 times if os_file_readdir_next_file() returns -1. The
|
|||||||
idea is to read as much good data as we can and jump over bad data.
|
idea is to read as much good data as we can and jump over bad data.
|
||||||
@return 0 if ok, -1 if error even after the retries, 1 if at the end
|
@return 0 if ok, -1 if error even after the retries, 1 if at the end
|
||||||
of the directory */
|
of the directory */
|
||||||
|
static
|
||||||
int
|
int
|
||||||
fil_file_readdir_next_file(
|
fil_file_readdir_next_file(
|
||||||
/*=======================*/
|
/*=======================*/
|
||||||
@@ -4825,7 +4826,7 @@ space id is != 0.
|
|||||||
@return DB_SUCCESS or error number */
|
@return DB_SUCCESS or error number */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
dberr_t
|
dberr_t
|
||||||
fil_load_single_table_tablespaces(ibool (*pred)(const char*, const char*))
|
fil_load_single_table_tablespaces(void)
|
||||||
/*===================================*/
|
/*===================================*/
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@@ -284,7 +284,7 @@ static TYPELIB innodb_stats_method_typelib = {
|
|||||||
|
|
||||||
/** Possible values for system variables "innodb_checksum_algorithm" and
|
/** Possible values for system variables "innodb_checksum_algorithm" and
|
||||||
"innodb_log_checksum_algorithm". */
|
"innodb_log_checksum_algorithm". */
|
||||||
const char* innodb_checksum_algorithm_names[] = {
|
static const char* innodb_checksum_algorithm_names[] = {
|
||||||
"CRC32",
|
"CRC32",
|
||||||
"STRICT_CRC32",
|
"STRICT_CRC32",
|
||||||
"INNODB",
|
"INNODB",
|
||||||
@@ -296,7 +296,7 @@ const char* innodb_checksum_algorithm_names[] = {
|
|||||||
|
|
||||||
/** Used to define an enumerate type of the system variables
|
/** Used to define an enumerate type of the system variables
|
||||||
innodb_checksum_algorithm and innodb_log_checksum_algorithm. */
|
innodb_checksum_algorithm and innodb_log_checksum_algorithm. */
|
||||||
TYPELIB innodb_checksum_algorithm_typelib = {
|
static TYPELIB innodb_checksum_algorithm_typelib = {
|
||||||
array_elements(innodb_checksum_algorithm_names) - 1,
|
array_elements(innodb_checksum_algorithm_names) - 1,
|
||||||
"innodb_checksum_algorithm_typelib",
|
"innodb_checksum_algorithm_typelib",
|
||||||
innodb_checksum_algorithm_names,
|
innodb_checksum_algorithm_names,
|
||||||
@@ -3016,7 +3016,7 @@ trx_is_started(
|
|||||||
/****************************************************************//**
|
/****************************************************************//**
|
||||||
Update log_checksum_algorithm_ptr with a pointer to the function corresponding
|
Update log_checksum_algorithm_ptr with a pointer to the function corresponding
|
||||||
to a given checksum algorithm. */
|
to a given checksum algorithm. */
|
||||||
|
static
|
||||||
void
|
void
|
||||||
innodb_log_checksum_func_update(
|
innodb_log_checksum_func_update(
|
||||||
/*============================*/
|
/*============================*/
|
||||||
|
@@ -868,7 +868,7 @@ space id is != 0.
|
|||||||
@return DB_SUCCESS or error number */
|
@return DB_SUCCESS or error number */
|
||||||
UNIV_INTERN
|
UNIV_INTERN
|
||||||
dberr_t
|
dberr_t
|
||||||
fil_load_single_table_tablespaces(ibool (*pred)(const char*, const char*)=0);
|
fil_load_single_table_tablespaces(void);
|
||||||
/*===================================*/
|
/*===================================*/
|
||||||
/*******************************************************************//**
|
/*******************************************************************//**
|
||||||
Returns TRUE if a single-table tablespace does not exist in the memory cache,
|
Returns TRUE if a single-table tablespace does not exist in the memory cache,
|
||||||
|
@@ -489,8 +489,6 @@ extern ulong srv_innodb_stats_method;
|
|||||||
|
|
||||||
#ifdef UNIV_LOG_ARCHIVE
|
#ifdef UNIV_LOG_ARCHIVE
|
||||||
extern ibool srv_log_archive_on;
|
extern ibool srv_log_archive_on;
|
||||||
extern ibool srv_archive_recovery;
|
|
||||||
extern ib_uint64_t srv_archive_recovery_limit_lsn;
|
|
||||||
#endif /* UNIV_LOG_ARCHIVE */
|
#endif /* UNIV_LOG_ARCHIVE */
|
||||||
|
|
||||||
extern char* srv_file_flush_method_str;
|
extern char* srv_file_flush_method_str;
|
||||||
@@ -543,11 +541,6 @@ extern ulong srv_pass_corrupt_table;
|
|||||||
|
|
||||||
extern ulong srv_log_checksum_algorithm;
|
extern ulong srv_log_checksum_algorithm;
|
||||||
|
|
||||||
extern ibool srv_apply_log_only;
|
|
||||||
|
|
||||||
extern ibool srv_backup_mode;
|
|
||||||
extern ibool srv_close_files;
|
|
||||||
|
|
||||||
extern my_bool srv_force_primary_key;
|
extern my_bool srv_force_primary_key;
|
||||||
|
|
||||||
/* Helper macro to support srv_pass_corrupt_table checks. If 'cond' is FALSE,
|
/* Helper macro to support srv_pass_corrupt_table checks. If 'cond' is FALSE,
|
||||||
|
@@ -647,7 +647,7 @@ functions. */
|
|||||||
|
|
||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
#define usleep(a) Sleep((a)/1000)
|
#define usleep(a) Sleep((a)/1000)
|
||||||
typedef DWORD os_thread_ret_t;
|
typedef ulint os_thread_ret_t;
|
||||||
#define OS_THREAD_DUMMY_RETURN return(0)
|
#define OS_THREAD_DUMMY_RETURN return(0)
|
||||||
#else
|
#else
|
||||||
typedef void* os_thread_ret_t;
|
typedef void* os_thread_ret_t;
|
||||||
|
@@ -713,6 +713,7 @@ recv_synchronize_groups(
|
|||||||
/***********************************************************************//**
|
/***********************************************************************//**
|
||||||
Checks the consistency of the checkpoint info
|
Checks the consistency of the checkpoint info
|
||||||
@return TRUE if ok */
|
@return TRUE if ok */
|
||||||
|
static
|
||||||
ibool
|
ibool
|
||||||
recv_check_cp_is_consistent(
|
recv_check_cp_is_consistent(
|
||||||
/*========================*/
|
/*========================*/
|
||||||
@@ -742,7 +743,7 @@ recv_check_cp_is_consistent(
|
|||||||
/********************************************************//**
|
/********************************************************//**
|
||||||
Looks for the maximum consistent checkpoint from the log groups.
|
Looks for the maximum consistent checkpoint from the log groups.
|
||||||
@return error code or DB_SUCCESS */
|
@return error code or DB_SUCCESS */
|
||||||
MY_ATTRIBUTE((nonnull, warn_unused_result))
|
static MY_ATTRIBUTE((nonnull, warn_unused_result))
|
||||||
dberr_t
|
dberr_t
|
||||||
recv_find_max_checkpoint(
|
recv_find_max_checkpoint(
|
||||||
/*=====================*/
|
/*=====================*/
|
||||||
@@ -3783,102 +3784,6 @@ recv_reset_log_files_for_backup(
|
|||||||
}
|
}
|
||||||
#endif /* UNIV_HOTBACKUP */
|
#endif /* UNIV_HOTBACKUP */
|
||||||
|
|
||||||
/******************************************************//**
|
|
||||||
Checks the 4-byte checksum to the trailer checksum field of a log
|
|
||||||
block. We also accept a log block in the old format before
|
|
||||||
InnoDB-3.23.52 where the checksum field contains the log block number.
|
|
||||||
@return TRUE if ok, or if the log block may be in the format of InnoDB
|
|
||||||
version predating 3.23.52 */
|
|
||||||
UNIV_INTERN
|
|
||||||
ibool
|
|
||||||
log_block_checksum_is_ok_or_old_format(
|
|
||||||
/*===================================*/
|
|
||||||
const byte* block) /*!< in: pointer to a log block */
|
|
||||||
{
|
|
||||||
#ifdef UNIV_LOG_DEBUG
|
|
||||||
return(TRUE);
|
|
||||||
#endif /* UNIV_LOG_DEBUG */
|
|
||||||
|
|
||||||
ulint block_checksum = log_block_get_checksum(block);
|
|
||||||
|
|
||||||
if (UNIV_LIKELY(srv_log_checksum_algorithm ==
|
|
||||||
SRV_CHECKSUM_ALGORITHM_NONE ||
|
|
||||||
log_block_calc_checksum(block) == block_checksum)) {
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_CRC32 ||
|
|
||||||
srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB ||
|
|
||||||
srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_NONE) {
|
|
||||||
|
|
||||||
const char* algo = NULL;
|
|
||||||
|
|
||||||
ib_logf(IB_LOG_LEVEL_ERROR,
|
|
||||||
"log block checksum mismatch: expected " ULINTPF ", "
|
|
||||||
"calculated checksum " ULINTPF,
|
|
||||||
block_checksum,
|
|
||||||
log_block_calc_checksum(block));
|
|
||||||
|
|
||||||
if (block_checksum == LOG_NO_CHECKSUM_MAGIC) {
|
|
||||||
|
|
||||||
algo = "none";
|
|
||||||
} else if (block_checksum ==
|
|
||||||
log_block_calc_checksum_crc32(block)) {
|
|
||||||
|
|
||||||
algo = "crc32";
|
|
||||||
} else if (block_checksum ==
|
|
||||||
log_block_calc_checksum_innodb(block)) {
|
|
||||||
|
|
||||||
algo = "innodb";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (algo) {
|
|
||||||
|
|
||||||
const char* current_algo;
|
|
||||||
|
|
||||||
current_algo = buf_checksum_algorithm_name(
|
|
||||||
(srv_checksum_algorithm_t)
|
|
||||||
srv_log_checksum_algorithm);
|
|
||||||
|
|
||||||
ib_logf(IB_LOG_LEVEL_ERROR,
|
|
||||||
"current InnoDB log checksum type: %s, "
|
|
||||||
"detected log checksum type: %s",
|
|
||||||
current_algo,
|
|
||||||
algo);
|
|
||||||
}
|
|
||||||
|
|
||||||
ib_logf(IB_LOG_LEVEL_FATAL,
|
|
||||||
"STRICT method was specified for innodb_log_checksum, "
|
|
||||||
"so we intentionally assert here.");
|
|
||||||
}
|
|
||||||
|
|
||||||
ut_ad(srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_CRC32 ||
|
|
||||||
srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB);
|
|
||||||
|
|
||||||
if (block_checksum == LOG_NO_CHECKSUM_MAGIC ||
|
|
||||||
block_checksum == log_block_calc_checksum_crc32(block) ||
|
|
||||||
block_checksum == log_block_calc_checksum_innodb(block)) {
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (log_block_get_hdr_no(block) == block_checksum) {
|
|
||||||
|
|
||||||
/* We assume the log block is in the format of
|
|
||||||
InnoDB version < 3.23.52 and the block is ok */
|
|
||||||
#if 0
|
|
||||||
fprintf(stderr,
|
|
||||||
"InnoDB: Scanned old format < InnoDB-3.23.52"
|
|
||||||
" log block number %lu\n",
|
|
||||||
log_block_get_hdr_no(block));
|
|
||||||
#endif
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
void recv_dblwr_t::add(byte* page)
|
void recv_dblwr_t::add(byte* page)
|
||||||
{
|
{
|
||||||
pages.push_back(page);
|
pages.push_back(page);
|
||||||
|
@@ -1010,6 +1010,7 @@ os_file_lock(
|
|||||||
#ifndef UNIV_HOTBACKUP
|
#ifndef UNIV_HOTBACKUP
|
||||||
/****************************************************************//**
|
/****************************************************************//**
|
||||||
Creates the seek mutexes used in positioned reads and writes. */
|
Creates the seek mutexes used in positioned reads and writes. */
|
||||||
|
static
|
||||||
void
|
void
|
||||||
os_io_init_simple(void)
|
os_io_init_simple(void)
|
||||||
/*===================*/
|
/*===================*/
|
||||||
|
@@ -375,8 +375,6 @@ UNIV_INTERN ulong srv_read_ahead_threshold = 56;
|
|||||||
|
|
||||||
#ifdef UNIV_LOG_ARCHIVE
|
#ifdef UNIV_LOG_ARCHIVE
|
||||||
UNIV_INTERN ibool srv_log_archive_on = FALSE;
|
UNIV_INTERN ibool srv_log_archive_on = FALSE;
|
||||||
UNIV_INTERN ibool srv_archive_recovery = 0;
|
|
||||||
UNIV_INTERN ib_uint64_t srv_archive_recovery_limit_lsn;
|
|
||||||
#endif /* UNIV_LOG_ARCHIVE */
|
#endif /* UNIV_LOG_ARCHIVE */
|
||||||
|
|
||||||
/* This parameter is used to throttle the number of insert buffers that are
|
/* This parameter is used to throttle the number of insert buffers that are
|
||||||
@@ -536,11 +534,6 @@ UNIV_INTERN ulong srv_doublewrite_batch_size = 120;
|
|||||||
|
|
||||||
UNIV_INTERN ulong srv_replication_delay = 0;
|
UNIV_INTERN ulong srv_replication_delay = 0;
|
||||||
|
|
||||||
UNIV_INTERN ibool srv_apply_log_only = FALSE;
|
|
||||||
|
|
||||||
UNIV_INTERN ibool srv_backup_mode = FALSE;
|
|
||||||
UNIV_INTERN ibool srv_close_files = TRUE;
|
|
||||||
|
|
||||||
UNIV_INTERN ulong srv_pass_corrupt_table = 0; /* 0:disable 1:enable */
|
UNIV_INTERN ulong srv_pass_corrupt_table = 0; /* 0:disable 1:enable */
|
||||||
|
|
||||||
UNIV_INTERN ulong srv_log_checksum_algorithm =
|
UNIV_INTERN ulong srv_log_checksum_algorithm =
|
||||||
|
@@ -136,7 +136,7 @@ SRV_SHUTDOWN_CLEANUP and then to SRV_SHUTDOWN_LAST_PHASE, and so on */
|
|||||||
UNIV_INTERN enum srv_shutdown_state srv_shutdown_state = SRV_SHUTDOWN_NONE;
|
UNIV_INTERN enum srv_shutdown_state srv_shutdown_state = SRV_SHUTDOWN_NONE;
|
||||||
|
|
||||||
/** Files comprising the system tablespace */
|
/** Files comprising the system tablespace */
|
||||||
os_file_t files[1000];
|
static os_file_t files[1000];
|
||||||
|
|
||||||
/** io_handler_thread parameters for thread identification */
|
/** io_handler_thread parameters for thread identification */
|
||||||
static ulint n[SRV_MAX_N_IO_THREADS];
|
static ulint n[SRV_MAX_N_IO_THREADS];
|
||||||
@@ -826,7 +826,7 @@ open_log_file(
|
|||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
Creates or opens database data files and closes them.
|
Creates or opens database data files and closes them.
|
||||||
@return DB_SUCCESS or error code */
|
@return DB_SUCCESS or error code */
|
||||||
MY_ATTRIBUTE((nonnull, warn_unused_result))
|
static MY_ATTRIBUTE((nonnull, warn_unused_result))
|
||||||
dberr_t
|
dberr_t
|
||||||
open_or_create_data_files(
|
open_or_create_data_files(
|
||||||
/*======================*/
|
/*======================*/
|
||||||
@@ -1367,15 +1367,12 @@ srv_undo_tablespace_open(
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
Opens the configured number of undo tablespaces.
|
Opens the configured number of undo tablespaces.
|
||||||
@return DB_SUCCESS or error code */
|
@return DB_SUCCESS or error code */
|
||||||
|
static
|
||||||
dberr_t
|
dberr_t
|
||||||
srv_undo_tablespaces_init(
|
srv_undo_tablespaces_init(
|
||||||
/*======================*/
|
/*======================*/
|
||||||
ibool create_new_db, /*!< in: TRUE if new db being
|
ibool create_new_db, /*!< in: TRUE if new db being
|
||||||
created */
|
created */
|
||||||
ibool backup_mode, /*!< in: TRUE disables reading
|
|
||||||
the system tablespace (used in
|
|
||||||
XtraBackup), FALSE is passed on
|
|
||||||
recovery. */
|
|
||||||
const ulint n_conf_tablespaces, /*!< in: configured undo
|
const ulint n_conf_tablespaces, /*!< in: configured undo
|
||||||
tablespaces */
|
tablespaces */
|
||||||
ulint* n_opened) /*!< out: number of UNDO
|
ulint* n_opened) /*!< out: number of UNDO
|
||||||
@@ -2418,7 +2415,6 @@ files_checked:
|
|||||||
|
|
||||||
err = srv_undo_tablespaces_init(
|
err = srv_undo_tablespaces_init(
|
||||||
create_new_db,
|
create_new_db,
|
||||||
FALSE,
|
|
||||||
srv_undo_tablespaces,
|
srv_undo_tablespaces,
|
||||||
&srv_undo_tablespaces_open);
|
&srv_undo_tablespaces_open);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user