| 19 | } |
| 20 | |
| 21 | BlockIO InterpreterShowProcesslistQuery::execute() |
| 22 | { |
| 23 | auto context = getContext(); |
| 24 | |
| 25 | String query; |
| 26 | if (context->getSettingsRef()[Setting::show_processlist_include_internal]) |
| 27 | { |
| 28 | query = "SELECT * FROM system.processes ORDER BY elapsed DESC"; |
| 29 | } |
| 30 | else |
| 31 | { |
| 32 | query = "SELECT * FROM system.processes WHERE is_internal = 0 ORDER BY elapsed DESC"; |
| 33 | } |
| 34 | |
| 35 | auto query_context = Context::createCopy(context); |
| 36 | query_context->makeQueryContext(); |
| 37 | query_context->setCurrentQueryId(""); |
| 38 | |
| 39 | return executeQuery(query, query_context, QueryFlags{ .internal = true }).second; |
| 40 | } |
| 41 | |
| 42 | void registerInterpreterShowProcesslistQuery(InterpreterFactory & factory); |
| 43 | void registerInterpreterShowProcesslistQuery(InterpreterFactory & factory) |
nothing calls this directly
no test coverage detected