Skip to content

Commit

Permalink
small cleanups as per review
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Apr 9, 2015
1 parent 4d40a7d commit 72c8b3f
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 78 deletions.
9 changes: 4 additions & 5 deletions storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5744,19 +5744,18 @@ buf_page_decrypt_after_read(
buf_page_t* bpage) /*!< in/out: buffer page read from disk */
{
ut_ad(bpage->key_version == 0);
ulint zip_size = buf_page_get_zip_size(bpage);
ulint size = (zip_size) ? zip_size : UNIV_PAGE_SIZE;

byte* dst_frame = (zip_size) ? bpage->zip.data :
((buf_block_t*) bpage)->frame;

if (bpage->offset == 0) {
/* File header pages are not encrypted */
ut_a(bpage->crypt_buf == NULL);
return (TRUE);
}

ulint zip_size = buf_page_get_zip_size(bpage);
ulint size = (zip_size) ? zip_size : UNIV_PAGE_SIZE;

byte* dst_frame = (zip_size) ? bpage->zip.data :
((buf_block_t*) bpage)->frame;
const byte* src_frame = bpage->crypt_buf != NULL ?
bpage->crypt_buf : dst_frame;

Expand Down
4 changes: 0 additions & 4 deletions storage/innobase/buf/buf0dblwr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,6 @@ buf_dblwr_process()
fil_flush_file_spaces(FIL_TABLESPACE);

{
fprintf(stderr,
"Clear dblwr buffer after completing "
"processing of it...\n");

size_t bytes = TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE;
byte *unaligned_buf = static_cast<byte*>(
ut_malloc(bytes + UNIV_PAGE_SIZE - 1));
Expand Down
28 changes: 0 additions & 28 deletions storage/innobase/include/fts0fts.h
Original file line number Diff line number Diff line change
Expand Up @@ -715,34 +715,6 @@ fts_drop_index_tables(
dict_index_t* index) /*!< in: Index to drop */
__attribute__((nonnull, warn_unused_result));

/******************************************************************
Wait for background threads to stop using FTS index
*/
UNIV_INTERN
void
fts_wait_bg_to_stop_using_index(
/*======================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: FTS Index */
bool drop_table); /*!< in: in addition to stop
using index, also prevent
threads from start using it,
used by drop table */

/******************************************************************
Wait for background threads to stop using any FTS index of the table
*/
UNIV_INTERN
void
fts_wait_bg_to_stop_using_table(
/*======================*/
trx_t* trx, /*!< in: transaction */
dict_table_t* table, /*!< in: table to stop threads */
bool drop_table); /*!< in: in addition to stop
using table, also prevent
threads from start using it,
used by drop table */

/******************************************************************//**
Remove the table from the OPTIMIZER's list. We do wait for
acknowledgement from the consumer of the message. */
Expand Down
3 changes: 1 addition & 2 deletions storage/innobase/include/srv0srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,7 @@ struct export_var_t{
encryption errors */

ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
ulint innodb_sec_rec_cluster_reads_avoided;
/*!< srv_sec_rec_cluster_reads_avoided */
ulint innodb_sec_rec_cluster_reads_avoided; /*!< srv_sec_rec_cluster_reads_avoided */

ulint innodb_encryption_rotation_pages_read_from_cache;
ulint innodb_encryption_rotation_pages_read_from_disk;
Expand Down
10 changes: 5 additions & 5 deletions storage/xtradb/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5921,18 +5921,18 @@ buf_page_decrypt_after_read(
buf_page_t* bpage) /*!< in/out: buffer page read from disk */
{
ut_ad(bpage->key_version == 0);
ulint zip_size = buf_page_get_zip_size(bpage);
ulint size = (zip_size) ? zip_size : UNIV_PAGE_SIZE;

byte* dst_frame = (zip_size) ? bpage->zip.data :
((buf_block_t*) bpage)->frame;

if (bpage->offset == 0) {
/* File header pages are not encrypted */
ut_a(bpage->crypt_buf == NULL);
return (TRUE);
}

ulint zip_size = buf_page_get_zip_size(bpage);
ulint size = (zip_size) ? zip_size : UNIV_PAGE_SIZE;

byte* dst_frame = (zip_size) ? bpage->zip.data :
((buf_block_t*) bpage)->frame;
const byte* src_frame = bpage->crypt_buf != NULL ?
bpage->crypt_buf : dst_frame;

Expand Down
4 changes: 0 additions & 4 deletions storage/xtradb/buf/buf0dblwr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -630,10 +630,6 @@ buf_dblwr_process()
fil_flush_file_spaces(FIL_TABLESPACE);

{
fprintf(stderr,
"Clear dblwr buffer after completing "
"processing of it...\n");

size_t bytes = TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE;
byte *unaligned_buf = static_cast<byte*>(
ut_malloc(bytes + UNIV_PAGE_SIZE - 1));
Expand Down
28 changes: 0 additions & 28 deletions storage/xtradb/include/fts0fts.h
Original file line number Diff line number Diff line change
Expand Up @@ -715,34 +715,6 @@ fts_drop_index_tables(
dict_index_t* index) /*!< in: Index to drop */
__attribute__((nonnull, warn_unused_result));

/******************************************************************
Wait for background threads to stop using FTS index
*/
UNIV_INTERN
void
fts_wait_bg_to_stop_using_index(
/*======================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: FTS Index */
bool drop_table); /*!< in: in addition to stop
using index, also prevent
threads from start using it,
used by drop table */

/******************************************************************
Wait for background threads to stop using any FTS index of the table
*/
UNIV_INTERN
void
fts_wait_bg_to_stop_using_table(
/*======================*/
trx_t* trx, /*!< in: transaction */
dict_table_t* table, /*!< in: table to stop threads */
bool drop_table); /*!< in: in addition to stop
using table, also prevent
threads from start using it,
used by drop table */

/******************************************************************//**
Remove the table from the OPTIMIZER's list. We do wait for
acknowledgement from the consumer of the message. */
Expand Down
3 changes: 1 addition & 2 deletions storage/xtradb/include/srv0srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,7 @@ struct export_var_t{
encryption errors */

ulint innodb_sec_rec_cluster_reads; /*!< srv_sec_rec_cluster_reads */
ulint innodb_sec_rec_cluster_reads_avoided;
/*!< srv_sec_rec_cluster_reads_avoided */
ulint innodb_sec_rec_cluster_reads_avoided; /*!< srv_sec_rec_cluster_reads_avoided */

ulint innodb_encryption_rotation_pages_read_from_cache;
ulint innodb_encryption_rotation_pages_read_from_disk;
Expand Down

0 comments on commit 72c8b3f

Please sign in to comment.