| 340 | } |
| 341 | |
| 342 | bool |
| 343 | dbcontext::check_alive() |
| 344 | { |
| 345 | pthread_mutex_lock(&thd->mysys_var->mutex); |
| 346 | killed_state st = thd->killed; |
| 347 | pthread_mutex_unlock(&thd->mysys_var->mutex); |
| 348 | DBG_SHUT(fprintf(stderr, "chk HNDSOCK kst %p %p %d %zu\n", thd, &thd->killed, |
| 349 | (int)st, sizeof(*thd))); |
| 350 | if (st != NOT_KILLED) { |
| 351 | DBG_SHUT(fprintf(stderr, "chk HNDSOCK kst %d break\n", (int)st)); |
| 352 | return false; |
| 353 | } |
| 354 | return true; |
| 355 | } |
| 356 | |
| 357 | void |
| 358 | dbcontext::lock_tables_if() |