diff options
author | bar@mysql.com/bar.intranet.mysql.r18.ru <> | 2006-10-30 10:14:03 +0400 |
---|---|---|
committer | bar@mysql.com/bar.intranet.mysql.r18.ru <> | 2006-10-30 10:14:03 +0400 |
commit | 0e3a1eece7289c56bb653f25523d4518ba694452 (patch) | |
tree | 56d83c3d4412f22521f650d31f0aad70abfa1ade /sql/sql_string.h | |
parent | bbf84d6b9ee97076b7b99c6a2b8134880aafffe7 (diff) | |
download | mariadb-git-0e3a1eece7289c56bb653f25523d4518ba694452.tar.gz |
Bug#18908: ERROR 1406 (22001): Data too long for column :: using utf8
Problem: Too confusing error message when cannot convert
between string and column character sets on INSERT and UPDATE.
Fix: producing a better error message, instead of "Data too long"
in such cases
Additional changes: Adding "DROP TABLE IF EXISTS" into several
tests to be safe against failures in previous tests.
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 0659f684afe..09b8478adf8 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -32,6 +32,14 @@ String *copy_if_not_alloced(String *a,String *b,uint32 arg_length); uint32 copy_and_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs, const char *from, uint32 from_length, CHARSET_INFO *from_cs, uint *errors); +uint32 well_formed_copy_nchars(CHARSET_INFO *to_cs, + char *to, uint to_length, + CHARSET_INFO *from_cs, + const char *from, uint from_length, + uint nchars, + const char **well_formed_error_pos, + const char **cannot_convert_error_pos, + const char **from_end_pos); class String { |