1067
Quote the given identifier.
1068
If the given identifier is empty, it will be quoted.
1072
name the identifier to be appended
1073
name_length length of the appending identifier
1076
/* Factor the extern out */
1077
extern const CHARSET_INFO *system_charset_info, *files_charset_info;
1079
void String::append_identifier(const char *name, uint32_t length)
1081
const char *name_end;
1086
The identifier must be quoted as it includes a quote character or
1090
reserve(length*2 + 2);
1091
quote_char= (char) q;
1092
append("e_char, 1, system_charset_info);
1094
for (name_end= name+length ; name < name_end ; name+= length)
1096
unsigned char chr= (unsigned char) *name;
1097
length= my_mbcharlen(system_charset_info, chr);
1099
my_mbcharlen can return 0 on a wrong multibyte
1100
sequence. It is possible when upgrading from 4.0,
1101
and identifier contains some accented characters.
1102
The manual says it does not work. So we'll just
1103
change length to 1 not to hang in the endless loop.
1107
if (length == 1 && chr == (unsigned char) quote_char)
1108
append("e_char, 1, system_charset_info);
1109
append(name, length, system_charset_info);
1111
append("e_char, 1, system_charset_info);
1068
1116
Exchange state of this object and argument.