mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-9665 Remove cs->cset->ismbchar()
Using a more powerfull cs->cset->charlen() instead.
This commit is contained in:
@@ -90,7 +90,7 @@ static char* add_identifier(THD* thd, char *to_p, const char * end_p,
|
||||
{
|
||||
uint res;
|
||||
uint errors;
|
||||
const char *conv_name;
|
||||
const char *conv_name, *conv_name_end;
|
||||
char tmp_name[FN_REFLEN];
|
||||
char conv_string[FN_REFLEN];
|
||||
int quote;
|
||||
@@ -111,11 +111,13 @@ static char* add_identifier(THD* thd, char *to_p, const char * end_p,
|
||||
{
|
||||
DBUG_PRINT("error", ("strconvert of '%s' failed with %u (errors: %u)", conv_name, res, errors));
|
||||
conv_name= name;
|
||||
conv_name_end= name + name_len;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBUG_PRINT("info", ("conv '%s' -> '%s'", conv_name, conv_string));
|
||||
conv_name= conv_string;
|
||||
conv_name_end= conv_string + res;
|
||||
}
|
||||
|
||||
quote = thd ? get_quote_char_for_identifier(thd, conv_name, res - 1) : '"';
|
||||
@@ -125,8 +127,8 @@ static char* add_identifier(THD* thd, char *to_p, const char * end_p,
|
||||
*(to_p++)= (char) quote;
|
||||
while (*conv_name && (end_p - to_p - 1) > 0)
|
||||
{
|
||||
uint length= my_mbcharlen(system_charset_info, *conv_name);
|
||||
if (!length)
|
||||
int length= my_charlen(system_charset_info, conv_name, conv_name_end);
|
||||
if (length <= 0)
|
||||
length= 1;
|
||||
if (length == 1 && *conv_name == (char) quote)
|
||||
{
|
||||
|
Reference in New Issue
Block a user