MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:November 9 2010 12:25pm
Subject:bzr commit into mysql-5.5-bugteam branch (davi:3105) Bug#58080
View as plain text  
# At a local mysql-5.5-bugteam repository of davi

 3105 Davi Arnaut	2010-11-09
      Bug#58080: Crash on failure to create a thread to handle a user connection
      
      The problem was that the scheduler function used to handle a
      new user connection could use the ER() macro without having a
      THD object bound to the current thread. The crash would happen
      whenever the function failed to create a new thread to handle a
      user connection. Thread creation can fail due to lack or limit
      of available resources.
      
      The solution is to simply use the ER_THD() macro instead and pass
      to it the THD object which would be bound to the connection.
     @ sql/mysqld.cc
        Use ER_THD and pass the object.

    modified:
      sql/mysqld.cc
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2010-11-05 13:16:27 +0000
+++ b/sql/mysqld.cc	2010-11-09 12:25:39 +0000
@@ -4949,7 +4949,7 @@ void create_thread_to_handle_connection(
       statistic_increment(aborted_connects,&LOCK_status);
       /* Can't use my_error() since store_globals has not been called. */
       my_snprintf(error_message_buff, sizeof(error_message_buff),
-                  ER(ER_CANT_CREATE_THREAD), error);
+                  ER_THD(thd, ER_CANT_CREATE_THREAD), error);
       net_send_error(thd, ER_CANT_CREATE_THREAD, error_message_buff, NULL);
       mysql_mutex_lock(&LOCK_thread_count);
       close_connection(thd,0,0);


Attachment: [text/bzr-bundle] bzr/davi.arnaut@oracle.com-20101109122539-vmmxxncfbyut7tpx.bundle
Thread
bzr commit into mysql-5.5-bugteam branch (davi:3105) Bug#58080Davi Arnaut9 Nov