Use thd_kill_level(thd) instead of thd->abort_on_warning if it is possible. refs #1964
Patch from Alexander Barkov. Thanks!