diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-22 12:03:36 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-22 15:10:39 +0200 |
commit | 545c9126963b26a093d5c8b6225cc52e360892e0 (patch) | |
tree | 32c469a97a3b6ae360f1b69c8014c807cdb974b3 /storage | |
parent | 7e02fd1f710e39e3cfccc507f24ceacee76b9439 (diff) | |
download | mariadb-git-545c9126963b26a093d5c8b6225cc52e360892e0.tar.gz |
Remove an unnecessary comparison.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fil/fil0crypt.cc | 5 | ||||
-rw-r--r-- | storage/innobase/include/fil0crypt.h | 3 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0crypt.cc | 5 | ||||
-rw-r--r-- | storage/xtradb/include/fil0crypt.h | 3 |
4 files changed, 0 insertions, 16 deletions
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index eb65e1758ed..6483cdc5a53 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -283,11 +283,6 @@ fil_space_read_crypt_data( const byte* page, /*!< in: page 0 */ ulint offset) /*!< in: offset */ { - if (memcmp(page + offset, EMPTY_PATTERN, MAGIC_SZ) == 0) { - /* Crypt data is not stored. */ - return NULL; - } - if (memcmp(page + offset, CRYPT_MAGIC, MAGIC_SZ) != 0) { /* Crypt data is not stored. */ return NULL; diff --git a/storage/innobase/include/fil0crypt.h b/storage/innobase/include/fil0crypt.h index 8bb0ce65a6b..9a35f6591e7 100644 --- a/storage/innobase/include/fil0crypt.h +++ b/storage/innobase/include/fil0crypt.h @@ -34,9 +34,6 @@ Created 04/01/2015 Jan Lindström static const unsigned char CRYPT_MAGIC[MAGIC_SZ] = { 's', 0xE, 0xC, 'R', 'E', 't' }; -static const unsigned char EMPTY_PATTERN[MAGIC_SZ] = { - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; - /* This key will be used if nothing else is given */ #define FIL_DEFAULT_ENCRYPTION_KEY ENCRYPTION_KEY_SYSTEM_DATA diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc index eb65e1758ed..6483cdc5a53 100644 --- a/storage/xtradb/fil/fil0crypt.cc +++ b/storage/xtradb/fil/fil0crypt.cc @@ -283,11 +283,6 @@ fil_space_read_crypt_data( const byte* page, /*!< in: page 0 */ ulint offset) /*!< in: offset */ { - if (memcmp(page + offset, EMPTY_PATTERN, MAGIC_SZ) == 0) { - /* Crypt data is not stored. */ - return NULL; - } - if (memcmp(page + offset, CRYPT_MAGIC, MAGIC_SZ) != 0) { /* Crypt data is not stored. */ return NULL; diff --git a/storage/xtradb/include/fil0crypt.h b/storage/xtradb/include/fil0crypt.h index 8bb0ce65a6b..9a35f6591e7 100644 --- a/storage/xtradb/include/fil0crypt.h +++ b/storage/xtradb/include/fil0crypt.h @@ -34,9 +34,6 @@ Created 04/01/2015 Jan Lindström static const unsigned char CRYPT_MAGIC[MAGIC_SZ] = { 's', 0xE, 0xC, 'R', 'E', 't' }; -static const unsigned char EMPTY_PATTERN[MAGIC_SZ] = { - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }; - /* This key will be used if nothing else is given */ #define FIL_DEFAULT_ENCRYPTION_KEY ENCRYPTION_KEY_SYSTEM_DATA |