My Project
Public Member Functions
Hash_slave_rows Class Reference

List of all members.

Public Member Functions

HASH_ROW_ENTRYmake_entry ()
HASH_ROW_ENTRYmake_entry (const uchar *bi_start, const uchar *bi_ends)
bool put (TABLE *table, MY_BITMAP *cols, HASH_ROW_ENTRY *entry)
HASH_ROW_ENTRYget (TABLE *table, MY_BITMAP *cols)
bool next (HASH_ROW_ENTRY **entry)
bool del (HASH_ROW_ENTRY *entry)
bool init (void)
bool deinit (void)
bool is_empty (void)
int size ()

Member Function Documentation

bool Hash_slave_rows::deinit ( void  )

De-initializes the hash table.

Returns:
true if something went wrong, false otherwise.

Deletes the entry pointed by entry. It also frees memory used holding entry contents. This is the way to release memeory used for entry, freeing it explicitly with my_free will cause undefined behavior.

Parameters:
entryPointer to the entry to be deleted.
Returns:
true if something went wrong, false otherwise.
HASH_ROW_ENTRY * Hash_slave_rows::get ( TABLE table,
MY_BITMAP *  cols 
)

Gets the entry, from the hash table, that matches the data in table->record[0] and signaled using cols.

Parameters:
tableThe table holding the buffer containing data used to make the entry lookup.
colsBitmap signaling which columns, from table->record[0], should be used.
Returns:
a pointer that will hold a reference to the entry found. If the entry is not found then NULL shall be returned.

Save the search state in case we need to go through entries for the given key.

bool Hash_slave_rows::init ( void  )

Initializes the hash table.

Returns:
true if something went wrong, false otherwise.

Hashing commodity structures and functions.

bool Hash_slave_rows::is_empty ( void  )

Checks if the hash table is empty or not.

Returns:
true if the hash table has zero entries, false otherwise.

Allocates an empty entry to be added to the hash table. It should be called before calling member function put.

Returns:
NULL if a problem occured, a valid pointer otherwise.
HASH_ROW_ENTRY * Hash_slave_rows::make_entry ( const uchar *  bi_start,
const uchar *  bi_ends 
)

Allocates an entry to be added to the hash table. It should be called before calling member function put.

Parameters:
bi_startthe position to where in the rows buffer the before image begins.
bi_endsthe position to where in the rows buffer the before image ends.
Returns:
NULL if a problem occured, a valid pointer otherwise.

Filling in the preamble.

Filling in the positions.

Filling in the entry

Gets the entry that stands next to the one pointed to by entry. Before calling this member function, the entry that one uses as parameter must have: 1. been obtained through get() or next() invocations; and 2. must have not been used before in a next() operation.

Parameters:
entry[IN/OUT]contains a pointer to an entry that we can use to search for another adjacent entry (ie, that shares the same key).
Returns:
true if something went wrong, false otherwise. In the case that this entry was already used in a next() operation this member function returns true and does not update the pointer.

Do the actual search in the hash table.

Save the search state for next iteration (if any).

bool Hash_slave_rows::put ( TABLE table,
MY_BITMAP *  cols,
HASH_ROW_ENTRY entry 
)

Puts data into the hash table. It calculates the key taking the data on TABLE::record as the input for hash computation.

Parameters:
tableThe table holding the buffer used to calculate the key, ie, table->record[0].
colsThe read_set bitmap signaling which columns are used.
entryThe entry with the values to store.
Returns:
true if something went wrong, false otherwise.

Skip blobs and BIT fields from key calculation. Handle X bits. Handle nulled fields. Handled fields not signaled.

Returns the number of entries in the hash table.

Returns:
the number of entries in the hash table.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines