diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-05 08:41:10 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-09 11:35:21 +0300 |
commit | d7f3d889de2a4f2a828de288175e7095bc838b6b (patch) | |
tree | bf0906c5987f805065ea5b8eca33703e22801809 /storage/xtradb/buf/buf0dblwr.cc | |
parent | f744b2a15ff3a8e2b93ae4f17ffe5a22af9bcd88 (diff) | |
download | mariadb-git-d7f3d889de2a4f2a828de288175e7095bc838b6b.tar.gz |
MDEV-8272: Encryption performance: Reduce the number of unused memcpy's
Removed memcpy's on cases when page is not encrypted and make sure
we use the correct buffer for reading/writing.
Diffstat (limited to 'storage/xtradb/buf/buf0dblwr.cc')
-rw-r--r-- | storage/xtradb/buf/buf0dblwr.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/xtradb/buf/buf0dblwr.cc b/storage/xtradb/buf/buf0dblwr.cc index 9323daf0076..7c7f28ddc2f 100644 --- a/storage/xtradb/buf/buf0dblwr.cc +++ b/storage/xtradb/buf/buf0dblwr.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved. +Copyright (c) 2013, 2015, MariaDB Corporation. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -391,11 +391,11 @@ buf_dblwr_init_or_load_pages( doublewrite = read_buf + TRX_SYS_DOUBLEWRITE; if (mach_read_from_4(read_buf + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION) != 0) { - fil_space_decrypt((ulint)TRX_SYS_SPACE, - read_buf, - UNIV_PAGE_SIZE, /* page size */ - read_buf + UNIV_PAGE_SIZE); - doublewrite = read_buf + UNIV_PAGE_SIZE + TRX_SYS_DOUBLEWRITE; + byte* tmp = fil_space_decrypt((ulint)TRX_SYS_SPACE, + read_buf + UNIV_PAGE_SIZE, + UNIV_PAGE_SIZE, /* page size */ + read_buf); + doublewrite = tmp + TRX_SYS_DOUBLEWRITE; } if (mach_read_from_4(doublewrite + TRX_SYS_DOUBLEWRITE_MAGIC) |