Class Innodb::Checksum
In: lib/innodb/checksum.rb
Parent: Object

Methods

Constants

MAX = 0xFFFFFFFF.freeze
MASK1 = 1463735687.freeze
MASK2 = 1653893711.freeze

Public Class methods

Iterate through the provided enumerator, which is expected to return a Fixnum (or something coercible to it), and "fold" them together to produce a single value.

This is derived from ut_fold_ulint_pair in include/ut0rnd.ic in the InnoDB source code. Since Ruby‘s Bignum class is much slower than its Fixnum class, we mask back to 32 bits to keep things from overflowing and being promoted to Bignum.

A simple helper (and example) to fold a provided string.

[Validate]