1#ifndef REWRITER_INCLUDED
2#define REWRITER_INCLUDED
#define MYSQL_THD
Definition: backup_page_tracker.h:38
A rule as persisted on disk.
Definition: persisted_rule.h:42
Implementation of the post parse query rewriter.
Definition: rewriter.h:50
malloc_unordered_multimap< std::string, std::unique_ptr< Rule > > m_digests
The in-memory rules hash table.
Definition: rewriter.h:87
longlong m_refresh_status
Definition: rewriter.h:84
void do_refresh(MYSQL_THD session_thd)
Implementation of the loading procedure.
Definition: rewriter.cc:120
bool load_rule(MYSQL_THD thd, Persisted_rule *diskrule)
Loads the rule retrieved from the database in the hash table.
Definition: rewriter.cc:67
Rewrite_result rewrite_query(MYSQL_THD thd, const uchar *key)
Attempts to rewrite thd's current query with digest in 'key'.
Definition: rewriter.cc:187
int get_number_loaded_rules() const
The number of rules currently loaded in the hash table.
Definition: rewriter.h:59
longlong refresh(MYSQL_THD thd)
Empty the hashtable and reload all rules from disk table.
Definition: rewriter.cc:172
std::unordered_multimap, but with my_malloc, so that you can track the memory used using PSI memory k...
Definition: map_helpers.h:189
static constexpr unsigned PSI_INSTRUMENT_ME
Definition: psi_bits.h:43
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
long long int longlong
Definition: my_inttypes.h:55
required string key
Definition: replication_asynchronous_connection_failover.proto:60
The results of an attempt to rewrite a query parse tree.
Definition: rule.h:37