List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:February 5 2010 12:55pm
Subject:bzr commit into mysql-5.1-bugteam branch (davi:3364) Bug#49025
View as plain text  
# At a local mysql-5.1-bugteam repository of davi

 3364 Davi Arnaut	2010-02-05
      Bug#49025: mysqld-debug: missing DBUG_RETURN or DBUG_VOID_RETURN macro in function "?func"
      
      The problem was that the dbug facility was being used after the
      per-thread dbug state had already been finalized. The was present
      in a few functions which invoked decrement_handler_count, which
      in turn invokes my_thread_end on Windows. In my_thread_end, the
      per-thread dbug state is finalized. Any use after the state is
      finalized ends up creating a new state.
      
      The solution is to process the exit of a function before the
      decrement_handler_count function is called.
     @ sql/mysqld.cc
        Process the function exit before decrement_handler_count is
        called, as it can end the per-thread dbug state on Windows.

    modified:
      sql/mysqld.cc
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2010-02-04 12:39:42 +0000
+++ b/sql/mysqld.cc	2010-02-05 12:55:20 +0000
@@ -5213,9 +5213,9 @@ pthread_handler_t handle_connections_soc
 
     create_new_thread(thd);
   }
-
+  DBUG_LEAVE;
   decrement_handler_count();
-  DBUG_RETURN(0);
+  return 0;
 }
 
 
@@ -5311,8 +5311,9 @@ pthread_handler_t handle_connections_nam
     create_new_thread(thd);
   }
   CloseHandle(connectOverlapped.hEvent);
+  DBUG_LEAVE;
   decrement_handler_count();
-  DBUG_RETURN(0);
+  return 0;
 }
 #endif /* __NT__ */
 
@@ -5548,9 +5549,9 @@ error:
   if (handle_connect_file_map)	CloseHandle(handle_connect_file_map);
   if (event_connect_answer)	CloseHandle(event_connect_answer);
   if (smem_event_connect_request) CloseHandle(smem_event_connect_request);
-
+  DBUG_LEAVE;
   decrement_handler_count();
-  DBUG_RETURN(0);
+  return 0;
 }
 #endif /* HAVE_SMEM */
 #endif /* EMBEDDED_LIBRARY */


Attachment: [text/bzr-bundle] bzr/davi.arnaut@sun.com-20100205125520-8dmpsmla2wv8tedz.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (davi:3364) Bug#49025Davi Arnaut5 Feb