List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:July 26 2011 12:40am
Subject:bzr push into mysql-trunk branch (chris.powers:3332 to 3333) WL#4896
View as plain text  
 3333 Christopher Powers	2011-07-25
      WL#4896 "Performance Schema Net IO"
      
      Fixes for handling IPV6

    modified:
      include/mysql/psi/mysql_socket.h
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_global.cc
      storage/perfschema/pfs_global.h
      storage/perfschema/pfs_instr.h
 3332 Christopher Powers	2011-07-24
      WL#4896 "Performance Schema Net IO"
      
      - Updated tests to reflect changes to performance_schema_max_stage_classes system var

    modified:
      mysql-test/r/mysqld--help-win.result
      mysql-test/suite/perfschema/r/start_server_no_socket_class.result
      mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
=== modified file 'include/mysql/psi/mysql_socket.h'
--- a/include/mysql/psi/mysql_socket.h	2011-07-19 16:39:30 +0000
+++ b/include/mysql/psi/mysql_socket.h	2011-07-26 00:39:25 +0000
@@ -878,12 +878,12 @@ inline_mysql_socket_accept
   if (likely(locker != NULL))
   {
     PSI_CALL(start_socket_wait)(locker, (size_t)0, src_file, src_line);
-    socket_accept.fd= accept(socket_listen.fd, addr, addr_len);
+    socket_accept.fd= accept(socket_listen.fd, addr, &addr_length);
     PSI_CALL(end_socket_wait)(locker, (size_t)0);
   }
   else
   {
-    socket_accept.fd= accept(socket_listen.fd, addr, addr_len);
+    socket_accept.fd= accept(socket_listen.fd, addr, &addr_length);
   }
 
   /** Initialize the instrument with the new socket descriptor and address */

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2011-07-22 20:08:29 +0000
+++ b/storage/perfschema/pfs.cc	2011-07-26 00:39:25 +0000
@@ -4764,8 +4764,8 @@ static void set_socket_info_v1(PSI_socke
     pfs->m_addr_len= addr_len;
   
     /** Restrict address length to size of struct */
-    if (unlikely(pfs->m_addr_len > sizeof(struct sockaddr)))
-      pfs->m_addr_len= sizeof(struct sockaddr);
+    if (unlikely(pfs->m_addr_len > sizeof(sockaddr_storage)))
+      pfs->m_addr_len= sizeof(struct sockaddr_storage);
   
     memcpy(&pfs->m_sock_addr, addr, pfs->m_addr_len);
   }

=== modified file 'storage/perfschema/pfs_global.cc'
--- a/storage/perfschema/pfs_global.cc	2011-04-19 19:46:36 +0000
+++ b/storage/perfschema/pfs_global.cc	2011-07-26 00:39:25 +0000
@@ -78,7 +78,7 @@ void pfs_print_error(const char *format,
 uint pfs_get_socket_address(char *host,
                             uint host_len,
                             uint *port,
-                            const struct sockaddr *src_addr,
+                            const struct sockaddr_storage *src_addr,
                             socklen_t src_len)
 {
   DBUG_ASSERT(host);
@@ -88,7 +88,7 @@ uint pfs_get_socket_address(char *host,
   memset(host, 0, host_len);
   *port= 0;
 
-  switch (src_addr->sa_family)
+  switch (src_addr->ss_family)
   {
     case AF_INET:
     {
@@ -114,7 +114,7 @@ uint pfs_get_socket_address(char *host,
       struct sockaddr_in6 *sa6= (struct sockaddr_in6 *)(src_addr);
     #ifdef __WIN__
       /* Older versions of Windows do not support inet_ntop() */
-      getnameinfo((struct sockaddr *)sa6, sizeof(struct sockaddr_in),
+      getnameinfo((struct sockaddr *)sa6, sizeof(struct sockaddr_in6),
                   host, host_len, NULL, 0, NI_NUMERICHOST);
     #else
       inet_ntop(AF_INET6, &(sa6->sin6_addr), host, INET6_ADDRSTRLEN);

=== modified file 'storage/perfschema/pfs_global.h'
--- a/storage/perfschema/pfs_global.h	2011-07-08 21:31:33 +0000
+++ b/storage/perfschema/pfs_global.h	2011-07-26 00:39:25 +0000
@@ -44,7 +44,7 @@ void pfs_free(void *ptr);
 uint pfs_get_socket_address(char *host,
                             uint host_len,
                             uint *port,
-                            const struct sockaddr *src_addr,
+                            const struct sockaddr_storage *src_addr,
                             socklen_t src_len);
 
 /**

=== modified file 'storage/perfschema/pfs_instr.h'
--- a/storage/perfschema/pfs_instr.h	2011-07-22 20:08:29 +0000
+++ b/storage/perfschema/pfs_instr.h	2011-07-26 00:39:25 +0000
@@ -246,7 +246,7 @@ struct PFS_socket : public PFS_instr
   /** Socket file descriptor */
   uint m_fd;
   /** Raw socket address */
-  struct sockaddr m_sock_addr;
+  struct sockaddr_storage  m_sock_addr;
   /** Length of address */
   socklen_t m_addr_len;
   /** Idle flag. */

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