Skip to content

Commit ee1d08c

Browse files
committed
Revert "Prepare XtraDB to be used with xtrabackup."
This reverts commit de5646f.
1 parent de5646f commit ee1d08c

File tree

11 files changed

+17
-135
lines changed

11 files changed

+17
-135
lines changed

sql/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ IF(SSL_DEFINES)
7777
ADD_DEFINITIONS(${SSL_DEFINES})
7878
ENDIF()
7979

80-
IF(WIN32)
81-
SET(NT_SERVICE_SOURCES nt_servc.cc nt_servc.h )
82-
ELSE()
83-
SET(NT_SERVICE_SOURCES)
84-
ENDIF()
85-
8680
SET (SQL_SOURCE
8781
../sql-common/client.c compat56.cc derror.cc des_key_file.cc
8882
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
@@ -149,7 +143,6 @@ SET (SQL_SOURCE
149143
${GEN_SOURCES}
150144
${GEN_DIGEST_SOURCES}
151145
${MYSYS_LIBWRAP_SOURCE}
152-
${NT_SERVICE_SOURCES}
153146
)
154147

155148
IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
@@ -179,7 +172,7 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
179172
${LIBSYSTEMD})
180173

181174
IF(WIN32)
182-
SET(MYSQLD_SOURCE main.cc message.rc)
175+
SET(MYSQLD_SOURCE main.cc nt_servc.cc nt_servc.h message.rc)
183176
TARGET_LINK_LIBRARIES(sql psapi)
184177
ELSE()
185178
SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})

storage/xtradb/btr/btr0btr.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ btr_root_fseg_validate(
722722
/**************************************************************//**
723723
Gets the root node of a tree and x- or s-latches it.
724724
@return root page, x- or s-latched */
725-
725+
static
726726
buf_block_t*
727727
btr_root_block_get(
728728
/*===============*/
@@ -1531,7 +1531,7 @@ btr_node_ptr_set_child_page_no(
15311531
/************************************************************//**
15321532
Returns the child page of a node pointer and x-latches it.
15331533
@return child page, x-latched */
1534-
1534+
static
15351535
buf_block_t*
15361536
btr_node_ptr_get_child(
15371537
/*===================*/

storage/xtradb/fil/fil0fil.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ fil_node_get_space_id(
379379

380380
/*******************************************************************//**
381381
Returns the table space by a given name, NULL if not found. */
382+
UNIV_INLINE
382383
fil_space_t*
383384
fil_space_get_by_name(
384385
/*==================*/
@@ -4784,7 +4785,7 @@ directory. We retry 100 times if os_file_readdir_next_file() returns -1. The
47844785
idea is to read as much good data as we can and jump over bad data.
47854786
@return 0 if ok, -1 if error even after the retries, 1 if at the end
47864787
of the directory */
4787-
4788+
static
47884789
int
47894790
fil_file_readdir_next_file(
47904791
/*=======================*/
@@ -4825,7 +4826,7 @@ space id is != 0.
48254826
@return DB_SUCCESS or error number */
48264827
UNIV_INTERN
48274828
dberr_t
4828-
fil_load_single_table_tablespaces(ibool (*pred)(const char*, const char*))
4829+
fil_load_single_table_tablespaces(void)
48294830
/*===================================*/
48304831
{
48314832
int ret;

storage/xtradb/handler/ha_innodb.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static TYPELIB innodb_stats_method_typelib = {
284284

285285
/** Possible values for system variables "innodb_checksum_algorithm" and
286286
"innodb_log_checksum_algorithm". */
287-
const char* innodb_checksum_algorithm_names[] = {
287+
static const char* innodb_checksum_algorithm_names[] = {
288288
"CRC32",
289289
"STRICT_CRC32",
290290
"INNODB",
@@ -296,7 +296,7 @@ const char* innodb_checksum_algorithm_names[] = {
296296

297297
/** Used to define an enumerate type of the system variables
298298
innodb_checksum_algorithm and innodb_log_checksum_algorithm. */
299-
TYPELIB innodb_checksum_algorithm_typelib = {
299+
static TYPELIB innodb_checksum_algorithm_typelib = {
300300
array_elements(innodb_checksum_algorithm_names) - 1,
301301
"innodb_checksum_algorithm_typelib",
302302
innodb_checksum_algorithm_names,
@@ -3016,7 +3016,7 @@ trx_is_started(
30163016
/****************************************************************//**
30173017
Update log_checksum_algorithm_ptr with a pointer to the function corresponding
30183018
to a given checksum algorithm. */
3019-
3019+
static
30203020
void
30213021
innodb_log_checksum_func_update(
30223022
/*============================*/

storage/xtradb/include/fil0fil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ space id is != 0.
868868
@return DB_SUCCESS or error number */
869869
UNIV_INTERN
870870
dberr_t
871-
fil_load_single_table_tablespaces(ibool (*pred)(const char*, const char*)=0);
871+
fil_load_single_table_tablespaces(void);
872872
/*===================================*/
873873
/*******************************************************************//**
874874
Returns TRUE if a single-table tablespace does not exist in the memory cache,

storage/xtradb/include/srv0srv.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,6 @@ extern ulong srv_innodb_stats_method;
489489

490490
#ifdef UNIV_LOG_ARCHIVE
491491
extern ibool srv_log_archive_on;
492-
extern ibool srv_archive_recovery;
493-
extern ib_uint64_t srv_archive_recovery_limit_lsn;
494492
#endif /* UNIV_LOG_ARCHIVE */
495493

496494
extern char* srv_file_flush_method_str;
@@ -543,11 +541,6 @@ extern ulong srv_pass_corrupt_table;
543541

544542
extern ulong srv_log_checksum_algorithm;
545543

546-
extern ibool srv_apply_log_only;
547-
548-
extern ibool srv_backup_mode;
549-
extern ibool srv_close_files;
550-
551544
extern my_bool srv_force_primary_key;
552545

553546
/* Helper macro to support srv_pass_corrupt_table checks. If 'cond' is FALSE,

storage/xtradb/include/univ.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ functions. */
647647

648648
#ifdef __WIN__
649649
#define usleep(a) Sleep((a)/1000)
650-
typedef DWORD os_thread_ret_t;
650+
typedef ulint os_thread_ret_t;
651651
#define OS_THREAD_DUMMY_RETURN return(0)
652652
#else
653653
typedef void* os_thread_ret_t;

storage/xtradb/log/log0recv.cc

Lines changed: 2 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ recv_synchronize_groups(
713713
/***********************************************************************//**
714714
Checks the consistency of the checkpoint info
715715
@return TRUE if ok */
716+
static
716717
ibool
717718
recv_check_cp_is_consistent(
718719
/*========================*/
@@ -742,7 +743,7 @@ recv_check_cp_is_consistent(
742743
/********************************************************//**
743744
Looks for the maximum consistent checkpoint from the log groups.
744745
@return error code or DB_SUCCESS */
745-
MY_ATTRIBUTE((nonnull, warn_unused_result))
746+
static MY_ATTRIBUTE((nonnull, warn_unused_result))
746747
dberr_t
747748
recv_find_max_checkpoint(
748749
/*=====================*/
@@ -3783,102 +3784,6 @@ recv_reset_log_files_for_backup(
37833784
}
37843785
#endif /* UNIV_HOTBACKUP */
37853786

3786-
/******************************************************//**
3787-
Checks the 4-byte checksum to the trailer checksum field of a log
3788-
block. We also accept a log block in the old format before
3789-
InnoDB-3.23.52 where the checksum field contains the log block number.
3790-
@return TRUE if ok, or if the log block may be in the format of InnoDB
3791-
version predating 3.23.52 */
3792-
UNIV_INTERN
3793-
ibool
3794-
log_block_checksum_is_ok_or_old_format(
3795-
/*===================================*/
3796-
const byte* block) /*!< in: pointer to a log block */
3797-
{
3798-
#ifdef UNIV_LOG_DEBUG
3799-
return(TRUE);
3800-
#endif /* UNIV_LOG_DEBUG */
3801-
3802-
ulint block_checksum = log_block_get_checksum(block);
3803-
3804-
if (UNIV_LIKELY(srv_log_checksum_algorithm ==
3805-
SRV_CHECKSUM_ALGORITHM_NONE ||
3806-
log_block_calc_checksum(block) == block_checksum)) {
3807-
3808-
return(TRUE);
3809-
}
3810-
3811-
if (srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_CRC32 ||
3812-
srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_INNODB ||
3813-
srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_NONE) {
3814-
3815-
const char* algo = NULL;
3816-
3817-
ib_logf(IB_LOG_LEVEL_ERROR,
3818-
"log block checksum mismatch: expected " ULINTPF ", "
3819-
"calculated checksum " ULINTPF,
3820-
block_checksum,
3821-
log_block_calc_checksum(block));
3822-
3823-
if (block_checksum == LOG_NO_CHECKSUM_MAGIC) {
3824-
3825-
algo = "none";
3826-
} else if (block_checksum ==
3827-
log_block_calc_checksum_crc32(block)) {
3828-
3829-
algo = "crc32";
3830-
} else if (block_checksum ==
3831-
log_block_calc_checksum_innodb(block)) {
3832-
3833-
algo = "innodb";
3834-
}
3835-
3836-
if (algo) {
3837-
3838-
const char* current_algo;
3839-
3840-
current_algo = buf_checksum_algorithm_name(
3841-
(srv_checksum_algorithm_t)
3842-
srv_log_checksum_algorithm);
3843-
3844-
ib_logf(IB_LOG_LEVEL_ERROR,
3845-
"current InnoDB log checksum type: %s, "
3846-
"detected log checksum type: %s",
3847-
current_algo,
3848-
algo);
3849-
}
3850-
3851-
ib_logf(IB_LOG_LEVEL_FATAL,
3852-
"STRICT method was specified for innodb_log_checksum, "
3853-
"so we intentionally assert here.");
3854-
}
3855-
3856-
ut_ad(srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_CRC32 ||
3857-
srv_log_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_INNODB);
3858-
3859-
if (block_checksum == LOG_NO_CHECKSUM_MAGIC ||
3860-
block_checksum == log_block_calc_checksum_crc32(block) ||
3861-
block_checksum == log_block_calc_checksum_innodb(block)) {
3862-
3863-
return(TRUE);
3864-
}
3865-
3866-
if (log_block_get_hdr_no(block) == block_checksum) {
3867-
3868-
/* We assume the log block is in the format of
3869-
InnoDB version < 3.23.52 and the block is ok */
3870-
#if 0
3871-
fprintf(stderr,
3872-
"InnoDB: Scanned old format < InnoDB-3.23.52"
3873-
" log block number %lu\n",
3874-
log_block_get_hdr_no(block));
3875-
#endif
3876-
return(TRUE);
3877-
}
3878-
3879-
return(FALSE);
3880-
}
3881-
38823787
void recv_dblwr_t::add(byte* page)
38833788
{
38843789
pages.push_back(page);

storage/xtradb/os/os0file.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ os_file_lock(
10101010
#ifndef UNIV_HOTBACKUP
10111011
/****************************************************************//**
10121012
Creates the seek mutexes used in positioned reads and writes. */
1013+
static
10131014
void
10141015
os_io_init_simple(void)
10151016
/*===================*/

storage/xtradb/srv/srv0srv.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,6 @@ UNIV_INTERN ulong srv_read_ahead_threshold = 56;
375375

376376
#ifdef UNIV_LOG_ARCHIVE
377377
UNIV_INTERN ibool srv_log_archive_on = FALSE;
378-
UNIV_INTERN ibool srv_archive_recovery = 0;
379-
UNIV_INTERN ib_uint64_t srv_archive_recovery_limit_lsn;
380378
#endif /* UNIV_LOG_ARCHIVE */
381379

382380
/* 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;
536534

537535
UNIV_INTERN ulong srv_replication_delay = 0;
538536

539-
UNIV_INTERN ibool srv_apply_log_only = FALSE;
540-
541-
UNIV_INTERN ibool srv_backup_mode = FALSE;
542-
UNIV_INTERN ibool srv_close_files = TRUE;
543-
544537
UNIV_INTERN ulong srv_pass_corrupt_table = 0; /* 0:disable 1:enable */
545538

546539
UNIV_INTERN ulong srv_log_checksum_algorithm =

0 commit comments

Comments
 (0)