• evgen@moonbone.local's avatar
    Bug#27563: Stored functions and triggers wasn't throwing an error when killed. · d1d58b5f
    evgen@moonbone.local authored
    If a stored function or a trigger was killed it had aborted but no error
    was thrown. This allows the caller statement to continue without a notice.
    This may lead to a wrong data being inserted/updated to/deleted as in such
    cases the correct result of a stored function isn't guaranteed. In the case
    of triggers it allows the caller statement to ignore kill signal and to
    waste time because of re-evaluation of triggers that always will fail
    because thd->killed flag is still on.
    
    Now the Item_func_sp::execute() and the sp_head::execute_trigger() functions
    check whether a function or a trigger were killed during execution and
    throws an appropriate error if so.
    Now the fill_record() function stops filling record if an error was reported
    through thd->net.report_error.
    d1d58b5f
sql_base.cc 181 KB