Determine connection priority , using current transaction state and 'threadpool_priority' variable value. */
| 214 | transaction state and 'threadpool_priority' variable value. |
| 215 | */ |
| 216 | static TP_PRIORITY get_priority(TP_connection *c) |
| 217 | { |
| 218 | DBUG_ASSERT(c->thd == current_thd); |
| 219 | TP_PRIORITY prio= (TP_PRIORITY)c->thd->variables.threadpool_priority; |
| 220 | if (prio == TP_PRIORITY_AUTO) |
| 221 | prio= c->thd->transaction->is_active() ? TP_PRIORITY_HIGH : TP_PRIORITY_LOW; |
| 222 | |
| 223 | return prio; |
| 224 | } |
| 225 | |
| 226 | |
| 227 | void tp_callback(TP_connection *c) |
no test coverage detected