diff options
author | unknown <tnurnberg@salvation.intern.azundris.com> | 2006-09-05 22:55:55 +0200 |
---|---|---|
committer | unknown <tnurnberg@salvation.intern.azundris.com> | 2006-09-05 22:55:55 +0200 |
commit | cbf19728f60c46e3103edd258a63490a6039d933 (patch) | |
tree | b6d52f2764ea4e76746e10f4f6aa38cd47104352 /sql/sql_string.cc | |
parent | 3c4e333d006758162e1912a2f5898640b7772967 (diff) | |
parent | 8ce43f8d23bf9533e4ff9f1dbd60611bbb0e27fc (diff) | |
download | mariadb-git-cbf19728f60c46e3103edd258a63490a6039d933.tar.gz |
Merge salvation.intern.azundris.com:/home/tnurnberg/21913/my50-21913
into salvation.intern.azundris.com:/home/tnurnberg/21913/my51-21913
sql/sql_string.cc:
Auto merged
mysql-test/r/func_time.result:
manual merge
mysql-test/t/func_time.test:
manual merge
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 89010c1e213..6e4d3f2ed0a 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -238,6 +238,10 @@ bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *cs) 0 No conversion needed 1 Either character set conversion or adding leading zeros (e.g. for UCS-2) must be done + + NOTE + to_cs may be NULL for "no conversion" if the system variable + character_set_results is NULL. */ bool String::needs_conversion(uint32 arg_length, @@ -246,7 +250,8 @@ bool String::needs_conversion(uint32 arg_length, uint32 *offset) { *offset= 0; - if ((to_cs == &my_charset_bin) || + if (!to_cs || + (to_cs == &my_charset_bin) || (to_cs == from_cs) || my_charset_same(from_cs, to_cs) || ((from_cs == &my_charset_bin) && |