| 10170 | |
| 10171 | |
| 10172 | bool 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 | /* |
no test coverage detected