MySQL 9.1.0
Source Code Documentation
rpl_write_set_handler.cc File Reference
#include "sql/rpl_write_set_handler.h"
#include <inttypes.h>
#include <stddef.h>
#include <sys/types.h>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "lex_string.h"
#include "my_base.h"
#include "my_dbug.h"
#include "my_inttypes.h"
#include "my_murmur3.h"
#include "my_xxhash.h"
#include "mysql/strings/m_ctype.h"
#include "mysql_com.h"
#include "sql-common/json_binary.h"
#include "sql-common/json_dom.h"
#include "sql/field.h"
#include "sql/key.h"
#include "sql/query_options.h"
#include "sql/rpl_transaction_write_set_ctx.h"
#include "sql/sql_class.h"
#include "sql/sql_const.h"
#include "sql/system_variables.h"
#include "sql/table.h"
#include "sql/transaction_info.h"
#include "template_utils.h"

Macros

#define HASH_STRING_SEPARATOR   "½"
 

Functions

static void debug_check_for_write_sets (std::vector< std::string > &key_list_to_hash, std::vector< uint64 > &hash_list)
 
static bool generate_hash_pke (const std::string &pke, THD *thd, std::vector< std::string > &write_sets, std::vector< uint64 > &hash_list)
 Function to generate the hash of the string passed to this function. More...
 
static bool generate_mv_hash_pke (const std::string &prefix_pke, THD *thd, Field *fld, std::vector< std::string > &write_sets, std::vector< uint64 > &hash_list)
 Function to generate set of hashes for a multi-valued key. More...
 
bool add_pke (TABLE *table, THD *thd, const uchar *record)
 Function to add the hash of the PKE to the transaction context object. More...
 

Macro Definition Documentation

◆ HASH_STRING_SEPARATOR

#define HASH_STRING_SEPARATOR   "½"

Function Documentation

◆ add_pke()

bool add_pke ( TABLE table,
THD thd,
const uchar record 
)

Function to add the hash of the PKE to the transaction context object.

Parameters
[in]table- TABLE object
[in]thd- THD object pointing to current thread.
[in]record- The record to process (record[0] or record[1]).
Returns
true if an issues exists adding the pke, false otherwise

◆ debug_check_for_write_sets()

static void debug_check_for_write_sets ( std::vector< std::string > &  key_list_to_hash,
std::vector< uint64 > &  hash_list 
)
static

◆ generate_hash_pke()

static bool generate_hash_pke ( const std::string &  pke,
THD thd,
std::vector< std::string > &  write_sets,
std::vector< uint64 > &  hash_list 
)
static

Function to generate the hash of the string passed to this function.

Parameters
[in]pke- the string to be hashed.
[in]thd- THD object pointing to current thread.
Returns
true if a problem occurred on generation or write set tracking.
Parameters
[in]write_sets- list of all write sets
[in]hash_list- list of all hashes

◆ generate_mv_hash_pke()

static bool generate_mv_hash_pke ( const std::string &  prefix_pke,
THD thd,
Field fld,
std::vector< std::string > &  write_sets,
std::vector< uint64 > &  hash_list 
)
static

Function to generate set of hashes for a multi-valued key.

Parameters
[in]prefix_pke- stringified non-multi-valued prefix of key
[in]thd- THD object pointing to current thread.
[in]fld- multi-valued keypart's field
Returns
true if a problem occurred on generation or write set tracking.
Parameters
[in]write_sets- DEBUG ONLY, vector of added PKEs
[in]hash_list- DEBUG ONLY, list of all hashes