Fixed issues when running mtr with --valgrind

- Note that some issues was also fixed in 10.2 and 10.4. I also fixed them
  here to be able to continue with making 10.5 valgrind safe again
- Disable connection threads warnings when doing shutdown
This commit is contained in:
Monty
2019-08-12 15:47:24 +03:00
committed by Sergei Golubchik
parent b444b6b910
commit 97dd057702
20 changed files with 299 additions and 76 deletions

View File

@ -474,7 +474,7 @@ static int scan(TABLE* table, uint field, char* strbuf, uint strbuf_len)
{
String str;
(void)table->field[field]->val_str(&str);
strncpy(strbuf, str.c_ptr(), std::min(str.length(), strbuf_len));
strncpy(strbuf, str.ptr(), std::min(str.length(), strbuf_len));
strbuf[strbuf_len - 1]= '\0';
return 0;
}