Skip to content

Commit e09feb2

Browse files
committed
Revert "Bug#25510805 - MYSQL CRASHES WHEN TRYING TO CONNECT FROM"
1 parent 5908518 commit e09feb2

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

sql/hostname.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
// sql_print_information
3434
#include "violite.h" // vio_getnameinfo,
3535
// vio_get_normalized_ip_string
36-
#include <string>
3736
#ifdef __cplusplus
3837
extern "C" { // Because of SCO 3.2V4.2
3938
#endif
@@ -552,14 +551,6 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage,
552551
}
553552
);
554553

555-
DBUG_EXECUTE_IF ("getnameinfo_fake_max_length",
556-
{
557-
std::string s(NI_MAXHOST, 'a');
558-
strcpy(hostname_buffer, s.c_str());
559-
err_code= 0;
560-
}
561-
);
562-
563554
/*
564555
===========================================================================
565556
DEBUG code only (end)

storage/perfschema/pfs.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
#include "sp_head.h"
4242
#include "pfs_digest.h"
4343

44-
using std::min;
45-
4644
/**
4745
@page PAGE_PERFORMANCE_SCHEMA The Performance Schema main page
4846
MySQL PERFORMANCE_SCHEMA implementation.
@@ -2020,8 +2018,7 @@ static void set_thread_account_v1(const char *user, int user_len,
20202018
DBUG_ASSERT((uint) user_len <= sizeof(pfs->m_username));
20212019
DBUG_ASSERT((host != NULL) || (host_len == 0));
20222020
DBUG_ASSERT(host_len >= 0);
2023-
2024-
host_len= min<size_t>(host_len, sizeof(pfs->m_hostname));
2021+
DBUG_ASSERT((uint) host_len <= sizeof(pfs->m_hostname));
20252022

20262023
if (unlikely(pfs == NULL))
20272024
return;

0 commit comments

Comments
 (0)