summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorvicentiu <vicentiu@mariadb.org>2017-01-06 17:09:59 +0200
committervicentiu <vicentiu@mariadb.org>2017-01-06 17:09:59 +0200
commite9aed131ead9e102c8948ebadc421960399722d4 (patch)
treeae8f4ee4ee7f7e915121ff2c73c88c20781c45ed /sql/sql_load.cc
parente4978d26b79120c58706e57fc66e4de1ec4b230c (diff)
parentae1b3d1991b679bb38095711de27934d7683deda (diff)
downloadmariadb-git-e9aed131ead9e102c8948ebadc421960399722d4.tar.gz
Merge remote-tracking branch 'origin/5.5' into 10.0
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 51a284964e1..6d803961621 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -1482,7 +1482,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
stack=stack_pos=(int*) sql_alloc(sizeof(int)*length);
if (!(buffer=(uchar*) my_malloc(buff_length+1,MYF(MY_WME | MY_THREAD_SPECIFIC))))
- error=1; /* purecov: inspected */
+ error= 1; /* purecov: inspected */
else
{
end_of_buff=buffer+buff_length;
@@ -1748,7 +1748,7 @@ int READ_INFO::read_field()
** We come here if buffer is too small. Enlarge it and continue
*/
if (!(new_buffer=(uchar*) my_realloc((char*) buffer,buff_length+1+IO_SIZE,
- MYF(MY_WME | MY_THREAD_SPECIFIC))))
+ MYF(MY_WME | MY_THREAD_SPECIFIC))))
return (error=1);
to=new_buffer + (to-buffer);
buffer=new_buffer;
@@ -1984,15 +1984,7 @@ int READ_INFO::read_value(int delim, String *val)
for (chr= GET; my_tospace(chr) != delim && chr != my_b_EOF;)
{
#ifdef USE_MB
- uint ml= my_mbcharlen(read_charset, chr);
- if (ml == 0)
- {
- chr= my_b_EOF;
- val->length(0);
- return chr;
- }
-
- if (ml > 1)
+ if (my_mbcharlen(read_charset, chr) > 1)
{
DBUG_PRINT("read_xml",("multi byte"));
int i, ml= my_mbcharlen(read_charset, chr);