| 2347 | |
| 2348 | |
| 2349 | void THD::reset_killed() |
| 2350 | { |
| 2351 | /* |
| 2352 | Resetting killed has to be done under a mutex to ensure |
| 2353 | its not done during an awake() call. |
| 2354 | */ |
| 2355 | DBUG_ENTER("reset_killed"); |
| 2356 | if (killed != NOT_KILLED) |
| 2357 | { |
| 2358 | mysql_mutex_assert_not_owner(&LOCK_thd_kill); |
| 2359 | mysql_mutex_lock(&LOCK_thd_kill); |
| 2360 | killed= NOT_KILLED; |
| 2361 | if (unlikely(killed_err)) |
| 2362 | { |
| 2363 | my_free(killed_err); |
| 2364 | killed_err= 0; |
| 2365 | } |
| 2366 | mysql_mutex_unlock(&LOCK_thd_kill); |
| 2367 | } |
| 2368 | #ifdef WITH_WSREP |
| 2369 | if (WSREP_NNULL(this)) |
| 2370 | { |
| 2371 | if (wsrep_abort_by_kill != NOT_KILLED) |
| 2372 | { |
| 2373 | mysql_mutex_assert_not_owner(&LOCK_thd_kill); |
| 2374 | mysql_mutex_lock(&LOCK_thd_kill); |
| 2375 | wsrep_abort_by_kill= NOT_KILLED; |
| 2376 | my_free(wsrep_abort_by_kill_err); |
| 2377 | wsrep_abort_by_kill_err= 0; |
| 2378 | mysql_mutex_unlock(&LOCK_thd_kill); |
| 2379 | } |
| 2380 | } |
| 2381 | mysql_mutex_assert_not_owner(&LOCK_thd_data); |
| 2382 | mysql_mutex_lock(&LOCK_thd_data); |
| 2383 | wsrep_aborter= 0; |
| 2384 | mysql_mutex_unlock(&LOCK_thd_data); |
| 2385 | #endif /* WITH_WSREP */ |
| 2386 | |
| 2387 | DBUG_VOID_RETURN; |
| 2388 | } |
| 2389 | |
| 2390 | |
| 2391 | /* |
no test coverage detected