diff options
author | Bjorn Munch <bjorn.munch@oracle.com> | 2010-10-26 08:30:02 +0200 |
---|---|---|
committer | Bjorn Munch <bjorn.munch@oracle.com> | 2010-10-26 08:30:02 +0200 |
commit | 32c86a488d9df95160f21c39a402393dcd52dee4 (patch) | |
tree | b7a56350fda66915dec0f048594da750b1a32cd0 /client | |
parent | 29f3d85df1d2f7d21ff494faae1002e7dea2d1b5 (diff) | |
parent | 56354413f86be103ce6c30aed879562894fb28e6 (diff) | |
download | mariadb-git-32c86a488d9df95160f21c39a402393dcd52dee4.tar.gz |
merge from 5.5-mtr
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 5e1cd15eb99..d3d20f109a2 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5883,7 +5883,7 @@ int read_line(char *buf, int size) /* Could be a multibyte character */ /* This code is based on the code in "sql_load.cc" */ #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 */ /* completed before we pass buf_end */ if ((charlen > 1) && (p + charlen) <= buf_end) @@ -5895,16 +5895,16 @@ int read_line(char *buf, int size) for (i= 1; i < charlen; i++) { + c= my_getc(cur_file->file); if (feof(cur_file->file)) goto found_eof; - c= my_getc(cur_file->file); *p++ = c; } if (! my_ismbchar(charset_info, mb_start, p)) { /* It was not a multiline char, push back the characters */ /* We leave first 'c', i.e. pretend it was a normal char */ - while (p > mb_start) + while (p-1 > mb_start) my_ungetc(*--p); } } @@ -9965,6 +9965,7 @@ void free_pointer_array(POINTER_ARRAY *pa) void replace_dynstr_append_mem(DYNAMIC_STRING *ds, const char *val, int len) { + char lower[512]; #ifdef __WIN__ fix_win_paths(val, len); #endif @@ -9972,7 +9973,6 @@ void replace_dynstr_append_mem(DYNAMIC_STRING *ds, if (display_result_lower) { /* Convert to lower case, and do this first */ - char lower[512]; char *c= lower; for (const char *v= val; *v; v++) *c++= my_tolower(charset_info, *v); |