• aelkin/elkin@andrepl.(none)'s avatar
    Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF() · 2afa90b5
    aelkin/elkin@andrepl.(none) authored
    thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where
    SF() modified non-ta table.
    As the result of this artifact it was not possible to detect whether there were any side-effects when
    top-level query ends. 
    If the top level query table was not modified and the bit is lost there would be no binlogging.
    
    Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags
    telling whether the current query and the current transaction modified any non-ta table.
    The flags stmt, all are dropped at the end of the query and the transaction.
    2afa90b5
sp_head.cc 93.9 KB