MySQL NDB Cluster API Developer Guide Ndb::computeHash()

Description.  This method can be used to compute a distribution hash value, given a table and its keys.


computeHash() can be used only for tables that use native NDB partitioning.


static int computeHash
      Uint32*                     hashvalueptr,
      const NdbDictionary::Table* table,
      const struct Key_part_ptr*  keyData,
      void*                       xfrmbuf = 0,
      Uint32                      xfrmbuflen = 0

Parameters.  This method takes the following parameters:

Return value.  0 on success, an error code on failure. (If the method call succeeds, the computed hash value is made available via hashvalueptr.)