diff options
author | unknown <bar@bar.mysql.r18.ru> | 2003-01-28 15:03:33 +0400 |
---|---|---|
committer | unknown <bar@bar.mysql.r18.ru> | 2003-01-28 15:03:33 +0400 |
commit | 4f6e3d22840cd14713fd0875a8da82812830b3a8 (patch) | |
tree | 389ccedd6cc168d2432cab00f80c759e83697896 /sql | |
parent | aa42950eb096ada3592e68165992b5e84ebcfc87 (diff) | |
parent | ee7c5f13fad9e2650bd676da606e0770fc88e3eb (diff) | |
download | mariadb-git-4f6e3d22840cd14713fd0875a8da82812830b3a8.tar.gz |
resolve
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 14 | ||||
-rw-r--r-- | sql/field.h | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/sql/field.cc b/sql/field.cc index 0fa306fe718..93ae5b81409 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3880,7 +3880,7 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs) { memcpy(ptr,from,length); if (length < field_length) - bfill(ptr+length,field_length-length,' '); + field_charset->fill(field_charset,ptr+length,field_length-length,' '); } else { @@ -3888,14 +3888,12 @@ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs) if (current_thd->count_cuted_fields) { // Check if we loosed some info const char *end=from+length; - for (from+=field_length ; from != end ; from++) + from+= field_length; + from+= field_charset->scan(field_charset, from, end, MY_SEQ_SPACES); + if (from != end) { - if (!my_isspace(field_charset,*from)) - { - current_thd->cuted_fields++; - error=1; - break; - } + current_thd->cuted_fields++; + error=1; } } } diff --git a/sql/field.h b/sql/field.h index 97900938e9d..4753cfeee45 100644 --- a/sql/field.h +++ b/sql/field.h @@ -787,7 +787,7 @@ public: enum ha_base_keytype key_type() const { return binary() ? HA_KEYTYPE_BINARY : HA_KEYTYPE_TEXT; } bool zero_pack() const { return 0; } - void reset(void) { bfill(ptr,field_length,' '); } + void reset(void) { charset()->fill(charset(),ptr,field_length,' '); } int store(const char *to,uint length,CHARSET_INFO *charset); int store(double nr); int store(longlong nr); |