summaryrefslogtreecommitdiff
path: root/libservices/kill_statement_service.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2016-12-28 17:13:14 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2016-12-29 15:27:24 +0200
commitf2fe65106f731df48072a16eea3cda0a903d7fe5 (patch)
treeef07f3290c41b14cbefa97d6d3cdcdb0a934fac2 /libservices/kill_statement_service.c
parent7bcae22bf196a35435bd297da76a853827edaeb7 (diff)
downloadmariadb-git-f2fe65106f731df48072a16eea3cda0a903d7fe5.tar.gz
MDEV-11679 Remove redundant function fsp_header_get_crypt_offset()
fsp_header_get_crypt_offset(): Remove. xdes_arr_size(): Remove. fsp_header_get_encryption_offset(): Make this an inline function. The correctness of this change was ensured with the following patch that ensures that the two functions returned the same value, only differing by FSP_HEADER_OFFSET (38 bytes): diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index f2a4c6bf218..e96c788b7df 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -850,6 +850,7 @@ fsp_parse_init_file_page( return(ptr); } +static ulint fsp_header_get_encryption_offset(const page_size_t&); /**********************************************************************//** Initializes the fsp system. */ void @@ -868,6 +869,31 @@ fsp_init(void) #endif /* Does nothing at the moment */ + + for (ulint sz = 4096; sz <= 65536; sz *= 2) { + ulint m; + if (sz <= 16384) { + for (ulint ph = 1024; ph <= sz; ph *= 2) { + const page_size_t ps(ph, sz, true); + ulint maria = fsp_header_get_crypt_offset(ps, &m), + oracle = fsp_header_get_encryption_offset(ps); + if (maria != oracle + 38) { + ib::error() << "zip size mismatch: " + << maria << "!=" << oracle + << "(" << ph <<","<<sz<<")" + << m; + } + } + } + const page_size_t p(sz, sz, false); + ulint maria = fsp_header_get_crypt_offset(p, &m), + oracle = fsp_header_get_encryption_offset(p); + if (maria != oracle + 38) { + ib::error() << "size mismatch: " + << maria << "!=" << oracle + << "(" <<sz<<")" << m; + } + } } /**********************************************************************//**
Diffstat (limited to 'libservices/kill_statement_service.c')
0 files changed, 0 insertions, 0 deletions