• svoj@mysql.com/april.(none)'s avatar
    BUG#29734 - thread_id=0 in binary log which leads to temporary table conflicts · c5608c9d
    svoj@mysql.com/april.(none) authored
    pseudo_thread_id was reset to zero via mysql_change_user() handling
    whereas there is no reason to do that.  Moreover, having two
    concurrent threads that change user and create a namesake temp tables
    leads to recording the dup pair of queries:
    
       set @@session.pseudo_thread_id = 0;
       CREATE temporary table `the namesake`;
    
    which will stall the slave as the second instance can not be created.
    And that is the bug case.
    
    Fixed by correcting pseudo_thread_id value after mysql_change_user().
    c5608c9d
sql_class.cc 62 KB