diff options
author | Ramil Kalimullin <ramil@mysql.com> | 2009-05-21 13:06:43 +0500 |
---|---|---|
committer | Ramil Kalimullin <ramil@mysql.com> | 2009-05-21 13:06:43 +0500 |
commit | fe350c59aa2fe3a41ed8b285aeeff217dc2ebe9e (patch) | |
tree | 0185f68987e2f6ff26e9d6e768a54ce71ea7fbbb /sql/sql_string.cc | |
parent | 8b5ea27aacd6482e24fa813a72e10ee9a3d298a9 (diff) | |
download | mariadb-git-fe350c59aa2fe3a41ed8b285aeeff217dc2ebe9e.tar.gz |
Fix for bug#44743: Join in combination with concat does not always work
bug#44766: valgrind error when using convert() in a subquery
Problem: input and output buffers may be the same
converting a string to some charset.
That may lead to wrong results/valgrind warnings.
Fix: use different buffers.
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 1dd7b55d136..61731f3b984 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -328,6 +328,9 @@ bool String::copy(const char *str, uint32 arg_length, CHARSET_INFO *from_cs, CHARSET_INFO *to_cs, uint *errors) { uint32 offset; + + DBUG_ASSERT(str != Ptr); + if (!needs_conversion(arg_length, from_cs, to_cs, &offset)) { *errors= 0; |