Bug #21072 Duplicate key error in NDB references wrong key: Re-wrote string...

Bug #21072  Duplicate key error in NDB references wrong key: Re-wrote string usage to avoid valgrind warnings
parent c845b3e1
...@@ -2035,9 +2035,7 @@ void handler::print_keydup_error(uint key_nr, const char *msg) ...@@ -2035,9 +2035,7 @@ void handler::print_keydup_error(uint key_nr, const char *msg)
if (key_nr == MAX_KEY) if (key_nr == MAX_KEY)
{ {
/* Key is unknown */ /* Key is unknown */
str.length(0); str.copy("", 0, system_charset_info);
str.append(STRING_WITH_LEN(""));
key_nr= -1;
my_printf_error(ER_DUP_ENTRY, msg, my_printf_error(ER_DUP_ENTRY, msg,
MYF(0), str.c_ptr(), "*UNKNOWN*"); MYF(0), str.c_ptr(), "*UNKNOWN*");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment