diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-03-30 12:48:42 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-03-30 12:48:42 +0200 |
commit | da4d71d10d23c1ac2d10b72baee14991ccb7a146 (patch) | |
tree | 7cdf3a8c8e72ca7c1c8105427c04123f025bd870 /extra | |
parent | 9ec85009985d644ce7ae797bc3572d0ad0f69bb0 (diff) | |
parent | a00517ac9707ffd51c092f5af5d198c5ee789bb4 (diff) | |
download | mariadb-git-da4d71d10d23c1ac2d10b72baee14991ccb7a146.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'extra')
-rw-r--r-- | extra/charset2html.c | 2 | ||||
-rw-r--r-- | extra/innochecksum.cc | 32 | ||||
-rw-r--r-- | extra/replace.c | 2 | ||||
-rw-r--r-- | extra/yassl/src/ssl.cpp | 1 |
4 files changed, 13 insertions, 24 deletions
diff --git a/extra/charset2html.c b/extra/charset2html.c index cafac2c1cd5..5851f206a1c 100644 --- a/extra/charset2html.c +++ b/extra/charset2html.c @@ -97,7 +97,7 @@ static void print_cs(CHARSET_INFO *cs) { /* Control characters 0x0080..0x009F are dysplayed by some - browers as if they were letters. Don't print them to + browsers as if they were letters. Don't print them to avoid confusion. */ printf("<TD>ctrl<TD>ctrl<TD>ctrl"); diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index 819b05364f8..fa50ca72867 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -51,6 +51,7 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */ #include "fut0lst.h" /* FLST_NODE_SIZE */ #include "buf0checksum.h" /* buf_calc_page_*() */ #include "fil0fil.h" /* FIL_* */ +#include "fil0crypt.h" #include "os0file.h" #include "fsp0fsp.h" /* fsp_flags_get_page_size() & fsp_flags_get_zip_size() */ @@ -64,24 +65,6 @@ The parts not included are excluded by #ifndef UNIV_INNOCHECKSUM. */ #define PRIuMAX "llu" #endif -/********************************************************************* -Verify checksum for a page (iff it's encrypted) -NOTE: currently this function can only be run in single threaded mode -as it modifies srv_checksum_algorithm (temporarily) -@param[in] src_fame page to verify -@param[in] page_size page_size -@param[in] page_no page number of given read_buf -@param[in] strict_check true if strict-check option is enabled -@return true if page is encrypted AND OK, false otherwise */ -UNIV_INTERN -bool -fil_space_verify_crypt_checksum( -/*============================*/ - const byte* src_frame, /*!< in: page the verify */ - const page_size_t& page_size /*!< in: page size */ - ,uintmax_t page_no, - bool strict_check); - /* Global variables */ static bool verbose; static bool just_count; @@ -576,6 +559,9 @@ is_page_corrupted( } } + /* FIXME: Read the page number from the tablespace header, + and check that every page carries the same page number. */ + /* If page is encrypted, use different checksum calculation as innochecksum can't decrypt pages. Note that some old InnoDB versions did not initialize FIL_PAGE_FILE_FLUSH_LSN field @@ -583,15 +569,19 @@ is_page_corrupted( normal method. */ if (mach_read_from_4(buf+FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0) { - is_corrupted = fil_space_verify_crypt_checksum(buf, page_size, - cur_page_num, strict_verify); + is_corrupted = fil_space_verify_crypt_checksum( + const_cast<byte*>(buf), page_size, + strict_verify, is_log_enabled ? log_file : NULL, + mach_read_from_4(buf + + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID), + cur_page_num); } else { is_corrupted = true; } if (is_corrupted) { is_corrupted = buf_page_is_corrupted( - true, buf, page_size, false, + true, buf, page_size, NULL, cur_page_num, strict_verify, is_log_enabled, log_file); } diff --git a/extra/replace.c b/extra/replace.c index 56cf02f2002..a9982670384 100644 --- a/extra/replace.c +++ b/extra/replace.c @@ -36,7 +36,7 @@ The programs make a DFA-state-machine of the strings and the speed isn't dependent on the count of replace-strings (only of the number of replaces). A line is assumed ending with \n or \0. - There are no limit exept memory on length of strings. + There are no limit except memory on length of strings. Written by Monty. fill_buffer_retaining() is taken from gnu-grep and modified. diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index c903516eca1..cb845a34c8a 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -774,7 +774,6 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file, const char* path) { int ret = SSL_FAILURE; - const int HALF_PATH = 128; if (file) ret = read_file(ctx, file, SSL_FILETYPE_PEM, CA); |