• Ramil Kalimullin's avatar
    Fix for bug#40770: Server Crash when running with triggers including · 0b28a456
    Ramil Kalimullin authored
    variable settings (rpl_sys)
    
    Problem: under certain conditions (e.g. user variables usage in triggers)
    accessing a user defined variable we may use a variables hash table that
    belongs to already deleted thread. It happens if
    thd= new THD;
    has the same address as just deleted thd as we use
    if (stored_thd == thd)
    to check.
    That may lead to unpredictable results, server crash etc.
    
    Fix: use thread_id instead of thd address to distinguish threads.
    
    Note: no simple and repeatable test case.
    0b28a456
item_func.cc 151 KB