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

Function check_ident_length

sql/sql_parse.cc:10172–10187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10170
10171
10172bool check_ident_length(const LEX_CSTRING *ident)
10173{
10174 /*
10175 string_char_length desite the names, goes into Well_formed_prefix_status
10176 so this is more than just a length comparison. Things like a primary key
10177 doesn't have a name, therefore no length. Also the ident grammar allows
10178 empty backtick. Check quickly the length, and if 0, accept that.
10179 */
10180 if (ident->length && check_string_char_length(ident, 0, NAME_CHAR_LEN,
10181 Lex_ident_ci::charset_info(), 1))
10182 {
10183 my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str);
10184 return 1;
10185 }
10186 return 0;
10187}
10188
10189
10190/*

Callers 6

check_name_with_errorMethod · 0.85
call_statement_startMethod · 0.85
sql_parse.ccFile · 0.85
mysql_create_functionFunction · 0.85

Calls 2

check_string_char_lengthFunction · 0.85
my_errorFunction · 0.85

Tested by

no test coverage detected