mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Review fixed
This commit is contained in:
@@ -59,8 +59,6 @@ int compare_ulonglong2(void* cmp_arg __attribute__((unused)),
|
||||
return compare_ulonglong(s,t);
|
||||
}
|
||||
|
||||
bool append_escaped(String *to_str, String *from_str);
|
||||
bool append_escaped(String *to_str, char *from, uint from_len);
|
||||
|
||||
Procedure *
|
||||
proc_analyse_init(THD *thd, ORDER *param, select_result *result,
|
||||
@@ -1087,38 +1085,3 @@ bool append_escaped(String *to_str, String *from_str)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool append_escaped(String *to_str, char *from, uint from_len)
|
||||
{
|
||||
char *end, c;
|
||||
|
||||
if (to_str->realloc(to_str->length() + from_len))
|
||||
return 1;
|
||||
|
||||
end= from + from_len;
|
||||
|
||||
for (; from < end; from++)
|
||||
{
|
||||
c= *from;
|
||||
switch (c) {
|
||||
case '\0':
|
||||
c= '0';
|
||||
break;
|
||||
case '\032':
|
||||
c= 'Z';
|
||||
break;
|
||||
case '\\':
|
||||
case '\'':
|
||||
break;
|
||||
default:
|
||||
goto normal_character;
|
||||
}
|
||||
if (to_str->append('\\'))
|
||||
return 1;
|
||||
|
||||
normal_character:
|
||||
if (to_str->append(c))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user