List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:August 11 2010 7:48pm
Subject:bzr push into mysql-next-mr-wl4896 branch (chris.powers:3160 to 3161) WL#4896
View as plain text  
 3161 Christopher Powers	2010-08-11
      WL#4896 PERFORMANCE_SCHEMA Instrumenting Net IO
      Updated socket instrumentation: 
      - Bytes read/written
      - Test for return codes

    modified:
      include/mysql/psi/mysql_socket.h
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h.pp
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_instr.cc
 3160 Christopher Powers	2010-08-04
      Merged with next-mr
      Integrated WL 4895 "Performance Schema Table IO"
      Integrated bug 55087, "Performance schema: optimization of the instrumentation interface"

    removed:
      include/mysql/psi/mysql_network.h
    added:
      storage/perfschema/table_helper.h.moved
    modified:
      include/mysql/psi/mysql_socket.h
      include/mysql/psi/psi_abi_v1.h.pp
      include/mysql/psi/psi_abi_v2.h.pp
      sql/mysqld.cc
      storage/perfschema/pfs.cc
      storage/perfschema/table_events_waits.cc
      storage/perfschema/table_helper.h
=== modified file 'include/mysql/psi/mysql_socket.h'
--- a/include/mysql/psi/mysql_socket.h	2010-08-04 15:47:50 +0000
+++ b/include/mysql/psi/mysql_socket.h	2010-08-11 19:48:41 +0000
@@ -71,9 +71,9 @@ Foundation, Inc., 51 Franklin St, Fifth
 */
 #ifdef HAVE_PSI_INTERFACE
   #define MYSQL_START_SOCKET_WAIT(PSI, OP, INDEX, FLAGS) \
-    inline_mysql_start_socket_wait(PSI, OP, INDEX, FLAGS, __FILE__, __LINE__)
+    inline_mysql_start_socket_wait(PSI, OP, INDEX, FLAGS, COUNT, __FILE__, __LINE__)
 #else
-  #define MYSQL_START_SOCKET_WAIT(PSI, OP, INDEX, FLAGS) \
+  #define MYSQL_START_SOCKET_WAIT(PSI, OP, INDEX, FLAGS, COUNT) \
     do {} while (0)
 #endif
 
@@ -84,10 +84,10 @@ Foundation, Inc., 51 Franklin St, Fifth
   @sa MYSQL_START_SOCKET_WAIT.
 */
 #ifdef HAVE_PSI_INTERFACE
-  #define MYSQL_END_SOCKET_WAIT(L) \
-    inline_mysql_end_socket_wait(L)
+  #define MYSQL_END_SOCKET_WAIT(L, C) \
+    inline_mysql_end_socket_wait(L, C)
 #else
-  #define MYSQL_END_SOCKET_WAIT(L) \
+  #define MYSQL_END_SOCKET_WAIT(L, C) \
     do {} while (0)
 #endif
 
@@ -101,7 +101,7 @@ Foundation, Inc., 51 Franklin St, Fifth
 static inline PSI_socket_locker *
 inline_mysql_start_socket_wait(PSI_socket_locker_state *state,
                               PSI_socket *psi, enum PSI_socket_operation op,
-                              uint index, ulong flags,
+                              uint index, ulong flags, size_t count,
                               const char *src_file, int src_line)
 {
   PSI_socket_locker *locker= NULL;
@@ -110,7 +110,7 @@ inline_mysql_start_socket_wait(PSI_socke
   {
     locker= PSI_server->get_thread_socket_locker(state, psi, op);
     if (likely(locker != NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, count, src_file, src_line);
   }
   return locker;
 }
@@ -120,10 +120,10 @@ inline_mysql_start_socket_wait(PSI_socke
   @sa MYSQL_END_SOCKET_WAIT.
 */
 static inline void
-inline_mysql_end_socket_wait(PSI_socket_locker *locker)
+inline_mysql_end_socket_wait(PSI_socket_locker *locker, size_t count)
 {
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, count);
 }
 #endif
 
@@ -368,13 +368,13 @@ inline_mysql_socket_socketpair
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_CREATE);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= socketpair(int domain, int type, int protocol, int fds[2]);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
 #endif
   return result;
@@ -399,16 +399,17 @@ inline_mysql_socket_bind
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_BIND);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= bind(mysql_socket.fd, addr, len);
 #ifdef HAVE_PSI_INTERFACE
-  if (likely(PSI_server != NULL && mysql_socket.m_psi != NULL))
+  if (likely(PSI_server != NULL && mysql_socket.m_psi != NULL
+      && result == 0))
     PSI_server->set_socket_address(mysql_socket.m_psi, addr);
 
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -432,13 +433,13 @@ inline_mysql_socket_getsockname
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_BIND);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= getsockname(mysql_socket.fd, addr, len);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -462,13 +463,13 @@ inline_mysql_socket_connect
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_CONNECT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= connect(mysql_socket.fd, addr, len);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -492,13 +493,13 @@ inline_mysql_socket_getpeername
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_BIND);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= getpeername(mysql_socket.fd, addr, len);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -522,13 +523,16 @@ inline_mysql_socket_send
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_SEND);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= send(mysql_socket.fd, buf, n, flags);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+  {
+    size_t bytes_written = (result > -1) ? result : 0;
+    PSI_server->end_socket_wait(locker, bytes_written);
+  }
 #endif
   return result;
 }
@@ -552,13 +556,16 @@ inline_mysql_socket_recv
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_RECV);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= recv(mysql_socket.fd, buf, n, flags);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+  {
+    size_t bytes_read = (result > -1) ? result : 0;
+    PSI_server->end_socket_wait(locker, bytes_read);
+  }
 #endif
   return result;
 }
@@ -582,13 +589,16 @@ inline_mysql_socket_sendto
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_SEND);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= sendto(mysql_socket.fd, buf, n, flags, addr, addr_len);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+  {
+    size_t bytes_written = (result > -1) ? result : 0;
+    PSI_server->end_socket_wait(locker, bytes_written);
+  }
 #endif
   return result;
 }
@@ -612,13 +622,16 @@ inline_mysql_socket_recvfrom
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_RECV);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= recvfrom(mysql_socket.fd, buf, n, flags, addr, addr_len);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+  {
+    size_t bytes_read = (result > -1) ? result : 0;
+    PSI_server->end_socket_wait(locker, bytes_read);
+  }
 #endif
   return result;
 }
@@ -642,13 +655,16 @@ inline_mysql_socket_sendmsg
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_SEND);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= sendmsg(mysql_socket.fd, message, flags);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+  {
+    size_t bytes_written = (result > -1) ? result : 0;
+    PSI_server->end_socket_wait(locker, bytes_written);
+  }
 #endif
   return result;
 }
@@ -672,13 +688,16 @@ inline_mysql_socket_recvmsg
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_RECV);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= recvmsg(mysql_socket.fd, message, flags);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+  {
+    size_t bytes_written = (result > -1) ? result : 0;
+    PSI_server->end_socket_wait(locker, bytes_written);
+  }
 #endif
   return result;
 }
@@ -702,13 +721,13 @@ inline_mysql_socket_getsockopt
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_OPT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= getsockopt(mysql_socket.fd, level, optname, optval, optlen);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -732,13 +751,13 @@ inline_mysql_socket_setsockopt
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_OPT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= setsockopt(mysql_socket.fd, level, optname, optval, optlen);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -762,13 +781,13 @@ inline_mysql_socket_listen
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_CONNECT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= listen(mysql_socket.fd, n);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -794,18 +813,19 @@ inline_mysql_socket_accept
   {
     locker= PSI_server->get_thread_socket_locker(&state, socket_accept.m_psi, PSI_SOCKET_CONNECT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   socket_accept.fd= accept(socket_listen.fd, addr, addr_len);
 
 #ifdef HAVE_PSI_INTERFACE
   /** Set socket address info */
-  if (likely(PSI_server != NULL && socket_accept.m_psi != NULL))
+  if (likely(PSI_server != NULL && socket_accept.m_psi != NULL
+      && socket_accept.fd > -1))
     PSI_server->set_socket_info(socket_accept.m_psi, socket_accept.fd, addr);
 
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return socket_accept;
 }
@@ -832,13 +852,18 @@ inline_mysql_socket_accept4
   {
     locker= PSI_server->get_thread_socket_locker(socket_accept.m_psi, PSI_SOCKET_CONNECT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   socket_accept.fd= accept4(socket_listen.fd, addr, addr_len, flags);
 #ifdef HAVE_PSI_INTERFACE
+  /** Set socket address info */
+  if (likely(PSI_server != NULL && socket_accept.m_psi != NULL
+      && socket_accept.fd > -1))
+    PSI_server->set_socket_info(socket_accept.m_psi, socket_accept.fd, addr);
+
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return socket_accept;
 }
@@ -846,7 +871,6 @@ inline_mysql_socket_accept4
 #endif
 
 
-
 /** mysql_socket_close */
 
 static inline int
@@ -866,13 +890,13 @@ inline_mysql_socket_close
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_CLOSE);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= closesocket(mysql_socket.fd);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -896,13 +920,13 @@ inline_mysql_socket_shutdown
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_SHUTDOWN);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= shutdown(mysql_socket.fd, how);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -926,13 +950,13 @@ inline_mysql_socket_sockatmark
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_STAT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= sockatmark(mysql_socket.fd);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }
@@ -956,13 +980,13 @@ inline_mysql_socket_isfdtype
   {
     locker= PSI_server->get_thread_socket_locker(&state, mysql_socket.m_psi, PSI_SOCKET_STAT);
     if (likely(locker !=NULL))
-      PSI_server->start_socket_wait(locker, src_file, src_line);
+      PSI_server->start_socket_wait(locker, (size_t)0, src_file, src_line);
   }
 #endif
   result= isfdtype(mysql_socket.fd, fdtype);
 #ifdef HAVE_PSI_INTERFACE
   if (likely(locker != NULL))
-    PSI_server->end_socket_wait(locker);
+    PSI_server->end_socket_wait(locker, (size_t)0);
 #endif
   return result;
 }

=== modified file 'include/mysql/psi/psi.h'
--- a/include/mysql/psi/psi.h	2010-08-04 03:19:48 +0000
+++ b/include/mysql/psi/psi.h	2010-08-11 19:48:41 +0000
@@ -1193,11 +1193,12 @@ typedef void (*end_file_wait_v1_t)
   Record a socket instrumentation start event.
   @param locker a socket locker for the running thread
   @param op socket operation to be performed
+  @param count the number of bytes requested, or 0 if not applicable
   @param src_file the source file name
   @param src_line the source line number
 */
 typedef void (*start_socket_wait_v1_t)
-  (struct PSI_socket_locker *locker,
+  (struct PSI_socket_locker *locker, size_t count,
    const char *src_file, uint src_line);
 
 /**
@@ -1206,10 +1207,12 @@ typedef void (*start_socket_wait_v1_t)
   associated with the socket (which was provided to obtain a locker)
   is invalid after this call.
   @param locker a socket locker for the running thread
+  @param count the number of bytes actually used in the operation,
+  or 0 if not applicable, or -1 if the operation failed
   @sa get_thread_socket_locker
 */
 typedef void (*end_socket_wait_v1_t)
-  (struct PSI_socket_locker *locker);
+  (struct PSI_socket_locker *locker, size_t count);
 
 /**
   Set the socket descriptor for an instrumented socket.

=== modified file 'include/mysql/psi/psi_abi_v1.h.pp'
--- a/include/mysql/psi/psi_abi_v1.h.pp	2010-08-04 15:47:50 +0000
+++ b/include/mysql/psi/psi_abi_v1.h.pp	2010-08-11 19:48:41 +0000
@@ -311,10 +311,10 @@ typedef void (*start_file_wait_v1_t)
 typedef void (*end_file_wait_v1_t)
   (struct PSI_file_locker *locker, size_t count);
 typedef void (*start_socket_wait_v1_t)
-  (struct PSI_socket_locker *locker,
+  (struct PSI_socket_locker *locker, size_t count,
    const char *src_file, uint src_line);
 typedef void (*end_socket_wait_v1_t)
-  (struct PSI_socket_locker *locker);
+  (struct PSI_socket_locker *locker, size_t count);
 typedef void (*set_socket_descriptor_v1_t)(struct PSI_socket *socket,
                                              uint fd);
 typedef void (*set_socket_address_v1_t)(struct PSI_socket *socket,

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2010-08-04 15:47:50 +0000
+++ b/storage/perfschema/pfs.cc	2010-08-11 19:48:41 +0000
@@ -2240,12 +2240,14 @@ static void end_file_wait_v1(PSI_file_lo
 /** Socket operations */
 
 static void start_socket_wait_v1(PSI_socket_locker *locker,
+                                     size_t count,
                                      const char *src_file,
                                      uint src_line);
 
-static void end_socket_wait_v1(PSI_socket_locker *locker);
+static void end_socket_wait_v1(PSI_socket_locker *locker, size_t count);
 
 static void start_socket_wait_v1(PSI_socket_locker *locker,
+                                     size_t count,
                                      const char *src_file,
                                      uint src_line)
 {
@@ -2260,14 +2262,16 @@ static void start_socket_wait_v1(PSI_soc
   }
   wait->m_source_file= src_file;
   wait->m_source_line= src_line;
+  wait->m_number_of_bytes= count;
 }
 
-static void end_socket_wait_v1(PSI_socket_locker *locker)
+static void end_socket_wait_v1(PSI_socket_locker *locker, size_t count)
 {
   PFS_wait_locker *pfs_locker= reinterpret_cast<PFS_wait_locker*> (locker);
   DBUG_ASSERT(pfs_locker != NULL);
   PFS_events_waits *wait= &pfs_locker->m_waits_current;
 
+  wait->m_number_of_bytes= count;
   if (wait->m_timer_state == TIMER_STATE_STARTED)
   {
     wait->m_timer_end= get_timer_value(pfs_locker->m_timer_name);
@@ -2297,17 +2301,18 @@ static void end_socket_wait_v1(PSI_socke
     break;
   case OPERATION_TYPE_SOCKETSEND:
     socket->m_socket_stat.m_count_send++;
-    //socket->m_socket_stat.m_send_bytes+= count; //TBD
-    //klass->m_socket_stat.m_send_bytes+= count; //TBD
+    socket->m_socket_stat.m_send_bytes+= count;
+    klass->m_socket_stat.m_send_bytes+= count;
     break;
   case OPERATION_TYPE_SOCKETRECV:
     socket->m_socket_stat.m_count_recv++;
-    //socket->m_socket_stat.m_recv_bytes+= count; //TBD
-    //klass->m_socket_stat.m_recv_bytes+= count; //TBD
+    socket->m_socket_stat.m_recv_bytes+= count;
+    klass->m_socket_stat.m_recv_bytes+= count;
     break;
   case OPERATION_TYPE_SOCKETCLOSE:
+    /** close() frees the file descriptor, shutdown() does not */
     release_socket(pfs_locker->m_target.m_socket);
-    destroy_socket(pfs_locker->m_target.m_socket); // TBD thread?
+    destroy_socket(pfs_locker->m_target.m_socket);
     break;
   case OPERATION_TYPE_SOCKETCONNECT:
   case OPERATION_TYPE_SOCKETBIND:

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2010-08-04 03:19:48 +0000
+++ b/storage/perfschema/pfs_instr.cc	2010-08-11 19:48:41 +0000
@@ -1143,7 +1143,7 @@ PFS_socket* create_socket(PFS_socket_cla
   Release instrumentation for a socket instance.
   @param pfs                          the socket to release
 */
-void release_socket(PFS_socket *pfs) // TBD
+void release_socket(PFS_socket *pfs)
 {
   DBUG_ASSERT(pfs != NULL);
   pfs->m_socket_stat.m_open_count--;


Attachment: [text/bzr-bundle] bzr/chris.powers@oracle.com-20100811194841-vls3loh35t80k4tx.bundle
Thread
bzr push into mysql-next-mr-wl4896 branch (chris.powers:3160 to 3161) WL#4896Christopher Powers11 Aug