From 30ebc3ee9efcab635b1f3e14b9198a58ae93c233 Mon Sep 17 00:00:00 2001 From: Monty Date: Wed, 4 Apr 2018 12:16:12 +0300 Subject: Add likely/unlikely to speed up execution Added to: - if (error) - Lex - sql_yacc.yy and sql_yacc_ora.yy - In header files to alloc() calls - Added thd argument to thd_net_is_killed() --- sql/hostname.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/hostname.cc') diff --git a/sql/hostname.cc b/sql/hostname.cc index 2d39a8bb03d..00c780d9f35 100644 --- a/sql/hostname.cc +++ b/sql/hostname.cc @@ -460,7 +460,7 @@ int ip_to_hostname(struct sockaddr_storage *ip_storage, entry->m_last_seen= now; *connect_errors= entry->m_errors.m_connect; - if (entry->m_errors.m_connect >= max_connect_errors) + if (unlikely(entry->m_errors.m_connect >= max_connect_errors)) { entry->m_errors.m_host_blocked++; entry->set_error_timestamps(now); -- cgit v1.2.1