Commit 8cdf07cf authored by Bjorn Munch's avatar Bjorn Munch

upmerge 52019

parents 7cd0a0d7 e4f9ead1
...@@ -5779,7 +5779,7 @@ int read_line(char *buf, int size) ...@@ -5779,7 +5779,7 @@ int read_line(char *buf, int size)
/* Could be a multibyte character */ /* Could be a multibyte character */
/* This code is based on the code in "sql_load.cc" */ /* This code is based on the code in "sql_load.cc" */
#ifdef USE_MB #ifdef USE_MB
int charlen = my_mbcharlen(charset_info, c); int charlen = my_mbcharlen(charset_info, (unsigned char) c);
/* We give up if multibyte character is started but not */ /* We give up if multibyte character is started but not */
/* completed before we pass buf_end */ /* completed before we pass buf_end */
if ((charlen > 1) && (p + charlen) <= buf_end) if ((charlen > 1) && (p + charlen) <= buf_end)
...@@ -5791,16 +5791,16 @@ int read_line(char *buf, int size) ...@@ -5791,16 +5791,16 @@ int read_line(char *buf, int size)
for (i= 1; i < charlen; i++) for (i= 1; i < charlen; i++)
{ {
c= my_getc(cur_file->file);
if (feof(cur_file->file)) if (feof(cur_file->file))
goto found_eof; goto found_eof;
c= my_getc(cur_file->file);
*p++ = c; *p++ = c;
} }
if (! my_ismbchar(charset_info, mb_start, p)) if (! my_ismbchar(charset_info, mb_start, p))
{ {
/* It was not a multiline char, push back the characters */ /* It was not a multiline char, push back the characters */
/* We leave first 'c', i.e. pretend it was a normal char */ /* We leave first 'c', i.e. pretend it was a normal char */
while (p > mb_start) while (p-1 > mb_start)
my_ungetc(*--p); my_ungetc(*--p);
} }
} }
...@@ -9864,6 +9864,7 @@ void free_pointer_array(POINTER_ARRAY *pa) ...@@ -9864,6 +9864,7 @@ void free_pointer_array(POINTER_ARRAY *pa)
void replace_dynstr_append_mem(DYNAMIC_STRING *ds, void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
const char *val, int len) const char *val, int len)
{ {
char lower[512];
#ifdef __WIN__ #ifdef __WIN__
fix_win_paths(val, len); fix_win_paths(val, len);
#endif #endif
...@@ -9871,7 +9872,6 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds, ...@@ -9871,7 +9872,6 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds,
if (display_result_lower) if (display_result_lower)
{ {
/* Convert to lower case, and do this first */ /* Convert to lower case, and do this first */
char lower[512];
char *c= lower; char *c= lower;
for (const char *v= val; *v; v++) for (const char *v= val; *v; v++)
*c++= my_tolower(charset_info, *v); *c++= my_tolower(charset_info, *v);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment