• Davi Arnaut's avatar
    Bug#58080: Crash on failure to create a thread to handle a user connection · 5d7d1a42
    Davi Arnaut authored
    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.
    
    Fix was tested manually. In a test case, it is too cumbersome to
    inject a error in this context.
    5d7d1a42
mysqld.cc 259 KB