MCPcopy Create free account
hub / github.com/MariaDB/server / check_string_char_length

Function check_string_char_length

sql/sql_parse.cc:10152–10169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10150
10151
10152bool check_string_char_length(const LEX_CSTRING *str, uint err_msg,
10153 size_t max_char_length, CHARSET_INFO *cs,
10154 bool no_error)
10155{
10156 Well_formed_prefix prefix(cs, str->str, str->length, max_char_length);
10157 if (likely(!prefix.well_formed_error_pos() &&
10158 str->length == prefix.length()))
10159 return FALSE;
10160
10161 if (!no_error)
10162 {
10163 ErrConvString err(str->str, str->length, cs);
10164 my_error(ER_WRONG_STRING_LENGTH, MYF(0), err.ptr(),
10165 err_msg ? ER(err_msg) : "",
10166 max_char_length);
10167 }
10168 return TRUE;
10169}
10170
10171
10172bool check_ident_length(const LEX_CSTRING *ident)

Callers 6

plugin_dl_addFunction · 0.85
init_spvar_definitionMethod · 0.85
create_eventMethod · 0.85
check_ident_lengthFunction · 0.85
udf_initFunction · 0.85

Calls 4

my_errorFunction · 0.85
well_formed_error_posMethod · 0.80
lengthMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected