MySQL 9.0.0
Source Code Documentation
log_builtins_filter.h File Reference

Go to the source code of this file.

Classes

struct  _log_filter_tag
 
struct  _log_filter_rule
 
struct  _log_filter_ruleset
 
struct  s_mysql_log_builtins_filter
 
struct  s_mysql_log_builtins_filter_debug
 Temporary primitives for logging services. More...
 

Macros

#define LOG_FILTER_RULE_MAX   512
 

Typedefs

typedef enum enum_log_filter_verb log_filter_verb
 
typedef enum enum_log_filter_cond log_filter_cond
 
typedef enum enum_log_filter_match log_filter_match
 Note that if our condition requires absence of the key, and the key does not exist, that constitutes success! More...
 
typedef enum enum_log_filter_apply log_filter_apply
 
typedef enum enum_log_filter_flags log_filter_flags
 
typedef struct _log_filter_tag log_filter_tag
 
typedef struct _log_filter_rule log_filter_rule
 
typedef struct _log_filter_ruleset log_filter_ruleset
 
typedef enum enum_log_builtins_lock log_builtins_filter_lock
 
typedef struct s_mysql_log_builtins_filter mysql_service_log_builtins_filter_t
 
typedef struct s_mysql_log_builtins_filter_debug mysql_service_log_builtins_filter_debug_t
 Temporary primitives for logging services. More...
 

Enumerations

enum  enum_log_filter_verb {
  LOG_FILTER_UNDEF = 0 , LOG_FILTER_DROP = 1 , LOG_FILTER_THROTTLE = 2 , LOG_FILTER_ITEM_SET = 3 ,
  LOG_FILTER_ITEM_DEL = 4 , LOG_FILTER_RETURN = 8 , LOG_FILTER_CHAIN_AND = 4096 , LOG_FILTER_CHAIN_OR = 4097
}
 
enum  enum_log_filter_cond {
  LOG_FILTER_COND_NONE = 0 , LOG_FILTER_COND_EQ = 1 , LOG_FILTER_COND_NE = 2 , LOG_FILTER_COND_LT = 3 ,
  LOG_FILTER_COND_LE = 4 , LOG_FILTER_COND_GE = 5 , LOG_FILTER_COND_GT = 6 , LOG_FILTER_COND_PRESENT = 7 ,
  LOG_FILTER_COND_ABSENT = 8
}
 
enum  enum_log_filter_match {
  LOG_FILTER_MATCH_SUCCESS = 0 , LOG_FILTER_MATCH_UNSATISFIED = 1 , LOG_FILTER_MATCH_UNCOMPARED = 2 , LOG_FILTER_MATCH_COMPARATOR_UNKNOWN = 4 ,
  LOG_FILTER_MATCH_CLASSES_DIFFER = 8 , LOG_FILTER_MATCH_UNSUPPORTED_FOR_TYPE = 16
}
 Note that if our condition requires absence of the key, and the key does not exist, that constitutes success! More...
 
enum  enum_log_filter_apply {
  LOG_FILTER_APPLY_SUCCESS = 0 , LOG_FILTER_APPLY_ARGUMENT_OUT_OF_RANGE = 1 , LOG_FILTER_APPLY_ITEM_BAG_FULL = 2 , LOG_FILTER_APPLY_OUT_OF_MEMORY = 4 ,
  LOG_FILTER_APPLY_UNKNOWN_OPERATION = 8 , LOG_FILTER_APPLY_TARGET_NOT_IN_LOG_LINE = 16
}
 
enum  enum_log_filter_flags { LOG_FILTER_FLAG_NONE = 0 , LOG_FILTER_FLAG_SYNTHETIC = 1 , LOG_FILTER_FLAG_DISABLED = 2 }
 
enum  enum_log_builtins_lock { LOG_BUILTINS_LOCK_NONE = 0 , LOG_BUILTINS_LOCK_SHARED = 1 , LOG_BUILTINS_LOCK_EXCLUSIVE = 2 }
 

Macro Definition Documentation

◆ LOG_FILTER_RULE_MAX

#define LOG_FILTER_RULE_MAX   512

Typedef Documentation

◆ log_builtins_filter_lock

◆ log_filter_apply

◆ log_filter_cond

◆ log_filter_flags

◆ log_filter_match

Note that if our condition requires absence of the key, and the key does not exist, that constitutes success!

◆ log_filter_rule

◆ log_filter_ruleset

◆ log_filter_tag

◆ log_filter_verb

◆ mysql_service_log_builtins_filter_debug_t

Temporary primitives for logging services.

◆ mysql_service_log_builtins_filter_t

Enumeration Type Documentation

◆ enum_log_builtins_lock

Enumerator
LOG_BUILTINS_LOCK_NONE 

undefined

LOG_BUILTINS_LOCK_SHARED 

read-only lock

LOG_BUILTINS_LOCK_EXCLUSIVE 

read-write lock

◆ enum_log_filter_apply

Enumerator
LOG_FILTER_APPLY_SUCCESS 

all's well that applies well

LOG_FILTER_APPLY_ARGUMENT_OUT_OF_RANGE 

invalid argument, e.g.

"keep -3 characters of this string"

LOG_FILTER_APPLY_ITEM_BAG_FULL 

log line does not accept further items

LOG_FILTER_APPLY_OUT_OF_MEMORY 

variant of malloc() failed

LOG_FILTER_APPLY_UNKNOWN_OPERATION 

action/verb not known/implement by this filter

LOG_FILTER_APPLY_TARGET_NOT_IN_LOG_LINE 

had a match for the condition/comparator, but not for the action/verb

◆ enum_log_filter_cond

Enumerator
LOG_FILTER_COND_NONE 

not set / unconditional

LOG_FILTER_COND_EQ 

equal

LOG_FILTER_COND_NE 

not equal

LOG_FILTER_COND_LT 

less than

LOG_FILTER_COND_LE 

less or equal

LOG_FILTER_COND_GE 

greater or equal

LOG_FILTER_COND_GT 

greater than

LOG_FILTER_COND_PRESENT 

field present

LOG_FILTER_COND_ABSENT 

field absent

◆ enum_log_filter_flags

Enumerator
LOG_FILTER_FLAG_NONE 

normal state

LOG_FILTER_FLAG_SYNTHETIC 

used to identify rules that don't come from the rule engine, but were injected by the server for emulation of legacy log_error_verbosity etc.

LOG_FILTER_FLAG_DISABLED 

rule temporarily disabled

◆ enum_log_filter_match

Note that if our condition requires absence of the key, and the key does not exist, that constitutes success!

Enumerator
LOG_FILTER_MATCH_SUCCESS 

success

LOG_FILTER_MATCH_UNSATISFIED 

failure

LOG_FILTER_MATCH_UNCOMPARED 

don't know yet

LOG_FILTER_MATCH_COMPARATOR_UNKNOWN 

invalid value

LOG_FILTER_MATCH_CLASSES_DIFFER 

either both or neither operands must be strings

LOG_FILTER_MATCH_UNSUPPORTED_FOR_TYPE 

comparator does not exist for this type (yet)

◆ enum_log_filter_verb

Enumerator
LOG_FILTER_UNDEF 

not set

LOG_FILTER_DROP 

drop this log event

LOG_FILTER_THROTTLE 

rate-limit this line class

LOG_FILTER_ITEM_SET 

add field

LOG_FILTER_ITEM_DEL 

remove field

LOG_FILTER_RETURN 

stop filtering, run (next filter or) sinks

LOG_FILTER_CHAIN_AND 

no verb yet, part of a condition chain

LOG_FILTER_CHAIN_OR 

no verb yet, part of a condition chain