• kroki/tomash@moonlight.intranet's avatar
    Fix for the patch for bug#21726: Incorrect result with multiple · 8798b462
    kroki/tomash@moonlight.intranet authored
    invocations of LAST_INSERT_ID.
    
    Reding of LAST_INSERT_ID inside stored function wasn't noted by caller,
    and no LAST_INSERT_ID_EVENT was issued for binary log.
    
    The solution is to add THD::last_insert_id_used_bin_log, which is much
    like THD::last_insert_id_used, but is reset only for upper-level
    statements.  This new variable is used to issue LAST_INSERT_ID_EVENT.
    8798b462
rpl_insert_id.result 6.9 KB