diff options
author | unknown <serg@serg.mylan> | 2003-12-06 19:05:26 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-12-06 19:05:26 +0100 |
commit | 8d143c1cd4c06db89fe8fb6e6df86fb9ff26af6e (patch) | |
tree | f9c88e2f87875a8d63da6a70bd2a56b9dca57fe4 /sql/sql_load.cc | |
parent | be972a50ec7af983e0f68da4ede9e887aa3b885b (diff) | |
download | mariadb-git-8d143c1cd4c06db89fe8fb6e6df86fb9ff26af6e.tar.gz |
fix for my_mbcharlen(charset, c) to return 1 for single-byte characters
(isn't it obvious ?)
mysys/charset.c:
all charsets support my_mbcharlen - no need to protect it with use_mb()
sql/sql_load.cc:
all charsets support my_mbcharlen - no need to protect it with use_mb()
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 0e7895689b5..0f39ab2663f 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -759,8 +759,7 @@ int READ_INFO::read_field() { chr = GET; #ifdef USE_MB - if (use_mb(read_charset) && - (my_mbcharlen(read_charset, chr) >1 )&& + if ((my_mbcharlen(read_charset, chr) > 1) && to+my_mbcharlen(read_charset, chr) <= end_of_buff) { uchar* p = (uchar*)to; @@ -946,7 +945,7 @@ int READ_INFO::next_line() { int chr = GET; #ifdef USE_MB - if (use_mb(read_charset) && (my_mbcharlen(read_charset, chr) >1 )) + if (my_mbcharlen(read_charset, chr) > 1) { for (int i=1; chr != my_b_EOF && i<my_mbcharlen(read_charset, chr); |