diff options
author | unknown <bar@mysql.com> | 2005-04-06 15:12:44 +0500 |
---|---|---|
committer | unknown <bar@mysql.com> | 2005-04-06 15:12:44 +0500 |
commit | 3683fc3453ad0fdd0f0437aaf562dd19a2defa5a (patch) | |
tree | ffab232fafade80d54e8318a2f471935917df81a /sql/field.cc | |
parent | 97b26d3b93abef87bc6918af326202467212e103 (diff) | |
download | mariadb-git-3683fc3453ad0fdd0f0437aaf562dd19a2defa5a.tar.gz |
Minor clean-ups for the previous commit.
sql/field.cc:
Use a separate variable. Otherwise "error" value gets lost
after well_formed_length call.
strings/ctype-mb.c:
Don't return an error if we reached end of line.
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/field.cc b/sql/field.cc index 740c027350d..d73257a673f 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4914,7 +4914,7 @@ void Field_datetime::sql_type(String &res) const int Field_string::store(const char *from,uint length,CHARSET_INFO *cs) { - int error= 0; + int error= 0, well_formed_error; uint32 not_used; char buff[80]; String tmpstr(buff,sizeof(buff), &my_charset_bin); @@ -4942,7 +4942,7 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs) from,from+length, field_length/ field_charset->mbmaxlen, - &error); + &well_formed_error); memcpy(ptr,from,copy_length); if (copy_length < field_length) // Append spaces if shorter field_charset->cset->fill(field_charset,ptr+copy_length, @@ -5545,7 +5545,7 @@ void Field_blob::put_length(char *pos, uint32 length) int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs) { - int error= 0; + int error= 0, well_formed_error; if (!length) { bzero(ptr,Field_blob::pack_length()); @@ -5580,7 +5580,7 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs) from,from + min(length, copy_length), copy_length, - &error); + &well_formed_error); if (copy_length < length) error= 1; Field_blob::store_length(copy_length); |