Skip to content

Commit bea8c6a

Browse files
committed
MDEV-37198 Killed query with side effects without error
mysql_update() aborts if SQL_SELECT::check_quick() fails. SQL_SELECT::check_quick() fails when thd->killed is set. Thus, mysql_update() must also test thd->killed to know how to terminate - normally (impossible where) or abnormally.
1 parent 053f9bc commit bea8c6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/sql_update.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ int mysql_update(THD *thd,
612612
Currently they rely on the user checking DA for
613613
errors when unwinding the stack after calling Item::val_xxx().
614614
*/
615-
if (error || thd->is_error())
615+
if (error || thd->killed || thd->is_error())
616616
{
617617
DBUG_RETURN(1); // Error in where
618618
}

0 commit comments

Comments
 (0)