drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzle_plugin::logging_query::Logging_query Class Reference
Inheritance diagram for drizzle_plugin::logging_query::Logging_query:
[legend]
Collaboration diagram for drizzle_plugin::logging_query::Logging_query:
[legend]

Public Member Functions

 Logging_query (const std::string &filename, const std::string &query_pcre)
bool setFileName (std::string new_filename)
bool setPCRE (std::string new_pcre)
std::string & getFileName ()
std::string & getPCRE ()
virtual bool post (Session *session)
Public Member Functions inherited from drizzled::plugin::Logging
 Logging (std::string name_arg)
virtual bool pre (Session *)
virtual bool postEnd (Session *)
virtual bool resetGlobalScoreboard ()
Public Member Functions inherited from drizzled::plugin::Plugin
 Plugin (const std::string &name, const std::string &type_name)
virtual void shutdownPlugin ()
virtual void prime ()
virtual void startup (drizzled::Session &)
void activate ()
void deactivate ()
bool isActive () const
const std::string & getName () const
void setModule (module::Module *module)
const std::string & getTypeName () const
virtual bool removeLast () const
const std::string & getModuleName () const

Private Member Functions

bool compilePCRE (const std::string &pattern, pcre2_code **compiled_re, bool *jit_ready)
int matchPCRE (const std::string &subject)

Private Attributes

std::string sysvar_filename
std::string sysvar_pcre
int fd
pcre2_code * re
bool re_jit_ready
pthread_mutex_t pcre_lock
boost::format formatter

Additional Inherited Members

Public Types inherited from drizzled::plugin::Plugin
typedef std::pair< const std::string, const std::string > map_key
typedef std::unique_ptr< plugin::Plugin, deleter_fn > owned_ptr
typedef std::map< const map_key, owned_ptr > map
typedef std::vector< Plugin * > vector
Static Public Member Functions inherited from drizzled::plugin::Logging
static bool addPlugin (Logging &handler)
static void removePlugin (Logging &handler)
static bool preDo (Session *session)
static bool postDo (Session *session)
static bool postEndDo (Session *session)
static bool resetStats (Session *session)

Detailed Description

Definition at line 154 of file logging_query.cc.

Constructor & Destructor Documentation

◆ Logging_query()

drizzle_plugin::logging_query::Logging_query::Logging_query ( const std::string & filename,
const std::string & query_pcre )
inline

Definition at line 243 of file logging_query.cc.

◆ ~Logging_query()

drizzle_plugin::logging_query::Logging_query::~Logging_query ( )
inline

Definition at line 363 of file logging_query.cc.

Member Function Documentation

◆ compilePCRE()

bool drizzle_plugin::logging_query::Logging_query::compilePCRE ( const std::string & pattern,
pcre2_code ** compiled_re,
bool * jit_ready )
inlineprivate

Definition at line 166 of file logging_query.cc.

◆ getFileName()

std::string & drizzle_plugin::logging_query::Logging_query::getFileName ( )
inline

Getter for query log filename

Returns
sysvar_filename

Definition at line 348 of file logging_query.cc.

◆ getPCRE()

std::string & drizzle_plugin::logging_query::Logging_query::getPCRE ( )
inline

Getter for pcre

Returns
sysvar_pcre

Definition at line 358 of file logging_query.cc.

◆ matchPCRE()

int drizzle_plugin::logging_query::Logging_query::matchPCRE ( const std::string & subject)
inlineprivate

Definition at line 183 of file logging_query.cc.

◆ post()

virtual bool drizzle_plugin::logging_query::Logging_query::post ( Session * session)
inlinevirtual

Reimplemented from drizzled::plugin::Logging.

Definition at line 378 of file logging_query.cc.

◆ setFileName()

bool drizzle_plugin::logging_query::Logging_query::setFileName ( std::string new_filename)
inline

This function changes the current query log file to the parameter passed to the function.

Returns
True on success, False on error.

Definition at line 281 of file logging_query.cc.

◆ setPCRE()

bool drizzle_plugin::logging_query::Logging_query::setPCRE ( std::string new_pcre)
inline

This function updates the current regex expression with the new regex expression passed as parameter.

Returns
True on success, False on error.

Definition at line 309 of file logging_query.cc.

Member Data Documentation

◆ fd

int drizzle_plugin::logging_query::Logging_query::fd
private

Definition at line 158 of file logging_query.cc.

◆ formatter

boost::format drizzle_plugin::logging_query::Logging_query::formatter
private

Format of the output string

Definition at line 164 of file logging_query.cc.

◆ pcre_lock

pthread_mutex_t drizzle_plugin::logging_query::Logging_query::pcre_lock
private

Definition at line 161 of file logging_query.cc.

◆ re

pcre2_code* drizzle_plugin::logging_query::Logging_query::re
private

Definition at line 159 of file logging_query.cc.

◆ re_jit_ready

bool drizzle_plugin::logging_query::Logging_query::re_jit_ready
private

Definition at line 160 of file logging_query.cc.

◆ sysvar_filename

std::string drizzle_plugin::logging_query::Logging_query::sysvar_filename
private

Definition at line 156 of file logging_query.cc.

◆ sysvar_pcre

std::string drizzle_plugin::logging_query::Logging_query::sysvar_pcre
private

Definition at line 157 of file logging_query.cc.


The documentation for this class was generated from the following file: