diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-13 22:19:09 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-13 22:19:09 +0200 |
commit | 62d28f83b606510fa2b191d2bb049bbfa78181ab (patch) | |
tree | 9edcfcb39b10c57238145ab9e37c78d822d90d33 /storage/innobase/ut | |
parent | 6dbc50a376813185d0dc1ac115b96d52af1a473b (diff) | |
download | mariadb-git-62d28f83b606510fa2b191d2bb049bbfa78181ab.tar.gz |
MDEV-17958: Remove WITH_INNODB_BUG_ENDIAN_CRC32
Remove the bug-compatible crc32 algorithm variant that was added
to allow an upgrade from data files from big-endian systems where
innodb_checksum_algorithm=crc32 was used on MySQL 5.6
or MariaDB 10.0 or 10.1.
Affected users should be able to recompute page checksums using
innochecksum.
Diffstat (limited to 'storage/innobase/ut')
-rw-r--r-- | storage/innobase/ut/ut0crc32.cc | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/storage/innobase/ut/ut0crc32.cc b/storage/innobase/ut/ut0crc32.cc index 0b1c1b3991a..3eef9329b57 100644 --- a/storage/innobase/ut/ut0crc32.cc +++ b/storage/innobase/ut/ut0crc32.cc @@ -469,34 +469,6 @@ ut_crc32_64_sw( *len -= 8; } -#ifdef INNODB_BUG_ENDIAN_CRC32 -/** Calculate CRC32 over 64-bit byte string using a software implementation. -The byte string is converted to a 64-bit integer using big endian byte order. -@param[in,out] crc crc32 checksum so far when this function is called, -when the function ends it will contain the new checksum -@param[in,out] data data to be checksummed, the pointer will be advanced -with 8 bytes -@param[in,out] len remaining bytes, it will be decremented with 8 */ -inline -void -ut_crc32_64_legacy_big_endian_sw( - uint32_t* crc, - const byte** data, - ulint* len) -{ - uint64_t data_int = *reinterpret_cast<const uint64_t*>(*data); - -#ifndef WORDS_BIGENDIAN - data_int = ut_crc32_swap_byteorder(data_int); -#endif /* WORDS_BIGENDIAN */ - - *crc = ut_crc32_64_low_sw(*crc, data_int); - - *data += 8; - *len -= 8; -} -#endif /* INNODB_BUG_ENDIAN_CRC32 */ - /** Calculates CRC32 in software, without using CPU instructions. @param[in] buf data over which to calculate CRC32 @param[in] len data length @@ -547,57 +519,6 @@ ut_crc32_sw( return(~crc); } -#ifdef INNODB_BUG_ENDIAN_CRC32 -/** Calculates CRC32 in software, without using CPU instructions. -This function uses big endian byte ordering when converting byte sequence to -integers. -@param[in] buf data over which to calculate CRC32 -@param[in] len data length -@return CRC-32C (polynomial 0x11EDC6F41) */ -uint32_t ut_crc32_legacy_big_endian(const byte* buf, ulint len) -{ - uint32_t crc = 0xFFFFFFFFU; - - ut_a(ut_crc32_slice8_table_initialized); - - /* Calculate byte-by-byte up to an 8-byte aligned address. After - this consume the input 8-bytes at a time. */ - while (len > 0 && (reinterpret_cast<uintptr_t>(buf) & 7) != 0) { - ut_crc32_8_sw(&crc, &buf, &len); - } - - while (len >= 128) { - /* This call is repeated 16 times. 16 * 8 = 128. */ - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - } - - while (len >= 8) { - ut_crc32_64_legacy_big_endian_sw(&crc, &buf, &len); - } - - while (len > 0) { - ut_crc32_8_sw(&crc, &buf, &len); - } - - return(~crc); -} -#endif /* INNODB_BUG_ENDIAN_CRC32 */ - /********************************************************************//** Initializes the data structures used by ut_crc32*(). Does not do any allocations, would not hurt if called twice, but would be pointless. */ @@ -637,9 +558,6 @@ ut_crc32_init() if (features_ecx & 1 << 20) { ut_crc32 = ut_crc32_hw; -#ifdef INNODB_BUG_ENDIAN_CRC32 - ut_crc32_legacy_big_endian = ut_crc32_legacy_big_endian_hw; -#endif /* INNODB_BUG_ENDIAN_CRC32 */ ut_crc32_implementation = "Using SSE2 crc32 instructions"; } #endif |