MySQL 8.4.0
Source Code Documentation
regular_expressions.h File Reference
#include <regex>
#include "mysql/components/services/bits/psi_bits.h"
#include "prealloced_array.h"

Go to the source code of this file.

Classes

struct  st_regex
 
struct  st_replace_regex
 

Functions

int multi_reg_replace (struct st_replace_regex *r, char *val, size_t *len)
 Execute all substitutions on val. More...
 
int search_protocol_re (std::regex *re, const char *str)
 Function to check if a protocol's regular expression matches the query string. More...
 

Variables

std::regex explain_re
 
std::regex opt_trace_re
 
std::regex ps_re
 
std::regex sp_re
 
std::regex view_re
 

Function Documentation

◆ multi_reg_replace()

int multi_reg_replace ( struct st_replace_regex r,
char *  val,
size_t *  len 
)

Execute all substitutions on val.

Parameters
[in]valPointer to the character string to be used as input for the regex replace operation.
[in,out]rPointer to the st_replace_regex structure which holds arguments and information for the command.
[in,out]lenPointer to variable holding length of input string.
Return values
TrueIf substituition was made.
FalseIf no substituition was made.
Note
r->buf points at the resulting buffer with all substitutions done. len points at length of resulting buffer. r->even_buf and r->odd_buf might have been reallocated. r->even_buf_len and r->odd_buf_len might have been changed.

◆ search_protocol_re()

int search_protocol_re ( std::regex *  re,
const char *  str 
)

Function to check if a protocol's regular expression matches the query string.

Parameters
rePointer to a precompiled regular expression.
strPointer to character string in which the pattern needs to be searched.
Return values
1If the pattern is found.
0If the pattern is not found.

Variable Documentation

◆ explain_re

std::regex explain_re
extern

◆ opt_trace_re

std::regex opt_trace_re
extern

◆ ps_re

std::regex ps_re
extern

◆ sp_re

std::regex sp_re
extern

◆ view_re

std::regex view_re
extern