Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
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. sql/item_func.cc: Bug#27563: Stored functions and triggers wasn't throwing an error when killed. Now the Item_func_sp::execute() function checks whether a trigger was killed during execution and throws an appropriate error if so. sql/sp_head.cc: Bug#27563: Stored functions and triggers wasn't throwing an error when killed. Now the sp_head::execute_trigger() function checks whether a function was killed during execution and throws an appropriate error if so. sql/sql_base.cc: Bug#27563: Stored functions and triggers wasn't throwing an error when killed. Now the fill_record() function stops filling record if an error was reported through thd->net.report_error. mysql-test/r/kill.result: Added a test case for the bug#27563: Stored functions and triggers wasn't throwing an error when killed. mysql-test/t/kill.test: Added a test case for the bug#27563: Stored functions and triggers wasn't throwing an error when killed.
Showing
Please register or sign in to comment