diff --git a/sql/handler.cc b/sql/handler.cc index a336d9916f1..61cc527d8a5 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3345,6 +3345,12 @@ void handler::print_error(int error, myf errflag) DBUG_ENTER("handler::print_error"); DBUG_PRINT("enter",("error: %d",error)); + if (ha_thd()->transaction_rollback_request) + { + /* Ensure this becomes a true error */ + errflag&= ~(ME_JUST_WARNING | ME_JUST_INFO); + } + int textno= -1; // impossible value switch (error) { case EACCES: