List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:July 19 2011 7:18am
Subject:bzr push into mysql-trunk branch (chris.powers:3321 to 3322) WL#4896
View as plain text  
 3322 Christopher Powers	2011-07-19
      WL#4896 "Performance Schema Net IO"
      
      - Restored check for null pointer in mysql_socket_socket() and mysql_socket_accept()

    modified:
      include/mysql/psi/mysql_socket.h
      sql/mysqld.cc
 3321 Christopher Powers	2011-07-19
      WL#4896 "Performance Schema Net IO"
      
      Improved stat collection for socket accept() by attributing
      wait time and op count to listener socket instead of new socket.

    modified:
      include/mysql/psi/mysql_socket.h
=== modified file 'include/mysql/psi/mysql_socket.h'
--- a/include/mysql/psi/mysql_socket.h	2011-07-19 06:16:01 +0000
+++ b/include/mysql/psi/mysql_socket.h	2011-07-19 07:17:11 +0000
@@ -531,8 +531,9 @@ inline_mysql_socket_socket
   mysql_socket.fd= socket(domain, type, protocol);
 
 #ifdef HAVE_PSI_SOCKET_INTERFACE
-  mysql_socket.m_psi = PSI_CALL(init_socket)(key, (const my_socket*)&mysql_socket.fd);
-  if (likely(mysql_socket.fd != INVALID_SOCKET))
+  mysql_socket.m_psi= PSI_CALL(init_socket)(key, (const my_socket*)&mysql_socket.fd);
+  
+  if (likely(mysql_socket.fd != INVALID_SOCKET && mysql_socket.m_psi != NULL))
     PSI_CALL(set_socket_info)(mysql_socket.m_psi, &mysql_socket.fd, NULL, 0);
 #endif
   return mysql_socket;
@@ -884,7 +885,7 @@ inline_mysql_socket_accept
     socket_accept.m_psi=
 	           PSI_CALL(init_socket)(key, (const my_socket*)&socket_accept.fd);
 
-    if (likely(socket_accept.fd != INVALID_SOCKET))
+    if (likely(socket_accept.fd != INVALID_SOCKET) && socket_accept.m_psi != NULL)
       PSI_CALL(set_socket_info)(socket_accept.m_psi, &socket_accept.fd,
                                 addr, addr_length);
     return socket_accept;

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-07-08 21:31:33 +0000
+++ b/sql/mysqld.cc	2011-07-19 07:17:11 +0000
@@ -8664,6 +8664,9 @@ void init_server_psi_keys(void)
   count= array_elements(all_server_stages);
   mysql_stage_register(category, all_server_stages, count);
 
+  count= array_elements(all_server_sockets);
+  mysql_socket_register(category, all_server_sockets, count);
+
 #ifdef HAVE_PSI_STATEMENT_INTERFACE
   init_sql_statement_info();
   count= array_elements(sql_statement_info);
@@ -8674,9 +8677,6 @@ void init_server_psi_keys(void)
   count= array_elements(com_statement_info);
   mysql_statement_register(category, com_statement_info, count);
 #endif
-
-  count= array_elements(all_server_sockets);
-  mysql_socket_register(category, all_server_sockets, count);
 }
 
 #endif /* HAVE_PSI_INTERFACE */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (chris.powers:3321 to 3322) WL#4896Christopher Powers19 Jul