| 2397 | */ |
| 2398 | |
| 2399 | bool check_host_name(LEX_STRING *str) |
| 2400 | { |
| 2401 | const char *name= str->str; |
| 2402 | const char *end= str->str + str->length; |
| 2403 | if (check_string_byte_length(str, ER(ER_HOSTNAME), HOSTNAME_LENGTH)) |
| 2404 | return TRUE; |
| 2405 | |
| 2406 | while (name != end) |
| 2407 | { |
| 2408 | if (*name == '@') |
| 2409 | { |
| 2410 | my_printf_error(ER_UNKNOWN_ERROR, |
| 2411 | "Malformed hostname (illegal symbol: '%c')", MYF(0), |
| 2412 | *name); |
| 2413 | return TRUE; |
| 2414 | } |
| 2415 | name++; |
| 2416 | } |
| 2417 | return FALSE; |
| 2418 | } |
| 2419 | |
| 2420 | |
| 2421 | extern int MYSQLparse(class THD *thd); // from sql_yacc.cc |
nothing calls this directly
no test coverage detected