• aelkin/elkin@koti.dsl.inet.fi's avatar
    Bug #27571 asynchronousity in setting mysql_`query`::error and · 27436f0b
    aelkin/elkin@koti.dsl.inet.fi authored
               Query_log_event::error_code
    
    A query can perform completely having the local var error of mysql_$query
    zero, where $query in insert, update, delete, load,
    and be  binlogged with error_code e.g KILLED_QUERY while there is no
    reason do to so.
    That can happen because Query_log_event consults thd->killed flag to
    evaluate error_code.
    
    Fixed with implementing a scheme suggested and partly implemented at
    time of bug@22725 work-on. error_status is cached immediatly after the
    control leaves the main rows-loop and that instance always corresponds
    to `error' the local of mysql_$query functions. The cached value
    is passed to Query_log_event constructor, not the default thd->killed
    which can be changed in between of the caching and the constructing.
    27436f0b
binlog_killed_simulate-master.opt 39 Bytes