MySQL 9.1.0
Source Code Documentation
|
Classes | |
class | Regexp_engine |
This class exposes high-level regular expression operations to the facade. More... | |
class | Regexp_facade |
This class handles. More... | |
struct | UErrorCodeHash |
Functions | |
bool | check_icu_status (UErrorCode status, const UParseError *parse_error) |
UBool | QueryNotKilled (const void *context, int32_t steps) |
Implements a match callback function for icu that aborts execution if the query was killed. More... | |
const char * | icu_version_string () |
static bool | EvalExprToCharset (Item *expr, std::u16string *out, int skip=0) |
Evaluates an expression to an output buffer, performing character set conversion to regexp_lib_charset if necessary. More... | |
Variables | |
std::unordered_map< UErrorCode, int, UErrorCodeHash > | error_map |
Map from ICU error codes to MySQL dittos. More... | |
CHARSET_INFO * | regexp_lib_charset = nullptr |
static const CHARSET_INFO * | faux_binary_charset = &my_charset_latin1 |
When dealing with the binary character set, we tell ICU that we're using CP-1252. More... | |
bool regexp::check_icu_status | ( | UErrorCode | status, |
const UParseError * | parse_error | ||
) |
|
static |
Evaluates an expression to an output buffer, performing character set conversion to regexp_lib_charset if necessary.
The procedure supports the optimization that code points before the start position are not converted to UTF-16.
expr | The expression to be printed. | |
[out] | out | Will be cleared, and the result stored. |
skip | If present, this number of code points will be exempted from conversion. If the string is smaller than that, an out of bounds error is raised. |
const char * regexp::icu_version_string | ( | ) |
UBool regexp::QueryNotKilled | ( | const void * | context, |
int32_t | steps | ||
) |
Implements a match callback function for icu that aborts execution if the query was killed.
context | The session to check for killed query. |
steps | Not used. |
false | Query was killed in the session and the match should abort. |
true | Query was not killed, matching should continue. |
std::unordered_map<UErrorCode, int, UErrorCodeHash> regexp::error_map |
Map from ICU error codes to MySQL dittos.
We strive to keep this list in the same order as the enum UErrorCode in common/unicode/utypes.h.
ICU version 67 introduced a new implementation for '\X' "Match a Grapheme Cluster". This means that our bundled version will return ER_REGEXP_MISSING_RESOURCE while for system ICU we return ER_WARN_REGEXP_USING_DEFAULT as a Note.
TODO(tdidriks) Bundle data files in icudt69b/brkitr/ icudt69l/brkitr/ so that bundled and system ICU results are aligned.
|
static |
When dealing with the binary character set, we tell ICU that we're using CP-1252.
This way, comparisons will happen as the user expects; each octet value is equal to itself, and only to itself. And of course, CP-1252 is known as "latin1" in MySQL.
CHARSET_INFO * regexp::regexp_lib_charset = nullptr |