2017-08-04 15:54:00 +00:00
|
|
|
#pragma once
|
2017-09-17 20:22:39 +00:00
|
|
|
|
2019-06-24 11:17:15 +00:00
|
|
|
#include "config_core.h"
|
2017-08-04 15:54:00 +00:00
|
|
|
#include <Parsers/IAST.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTSystemQuery : public IAST
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum class Type
|
|
|
|
{
|
2017-08-31 12:55:19 +00:00
|
|
|
UNKNOWN,
|
2017-08-04 15:54:00 +00:00
|
|
|
SHUTDOWN,
|
|
|
|
KILL,
|
|
|
|
DROP_DNS_CACHE,
|
|
|
|
DROP_MARK_CACHE,
|
|
|
|
DROP_UNCOMPRESSED_CACHE,
|
2018-08-30 16:31:20 +00:00
|
|
|
#if USE_EMBEDDED_COMPILER
|
2018-09-05 11:37:41 +00:00
|
|
|
DROP_COMPILED_EXPRESSION_CACHE,
|
2018-08-30 16:31:20 +00:00
|
|
|
#endif
|
2017-08-04 15:54:00 +00:00
|
|
|
STOP_LISTEN_QUERIES,
|
|
|
|
START_LISTEN_QUERIES,
|
|
|
|
RESTART_REPLICAS,
|
2018-05-21 13:49:54 +00:00
|
|
|
RESTART_REPLICA,
|
2017-08-04 15:54:00 +00:00
|
|
|
SYNC_REPLICA,
|
|
|
|
RELOAD_DICTIONARY,
|
|
|
|
RELOAD_DICTIONARIES,
|
2018-03-26 14:12:07 +00:00
|
|
|
RELOAD_EMBEDDED_DICTIONARIES,
|
2018-03-13 10:41:47 +00:00
|
|
|
RELOAD_CONFIG,
|
2017-08-04 15:54:00 +00:00
|
|
|
STOP_MERGES,
|
|
|
|
START_MERGES,
|
2018-05-21 13:49:54 +00:00
|
|
|
STOP_FETCHES,
|
|
|
|
START_FETCHES,
|
|
|
|
STOP_REPLICATED_SENDS,
|
2019-02-02 11:28:43 +00:00
|
|
|
START_REPLICATED_SENDS,
|
2017-08-04 15:54:00 +00:00
|
|
|
STOP_REPLICATION_QUEUES,
|
|
|
|
START_REPLICATION_QUEUES,
|
2018-10-09 10:05:27 +00:00
|
|
|
FLUSH_LOGS,
|
2019-05-10 04:19:02 +00:00
|
|
|
FLUSH_DISTRIBUTED,
|
2019-04-22 15:11:16 +00:00
|
|
|
STOP_DISTRIBUTED_SENDS,
|
|
|
|
START_DISTRIBUTED_SENDS,
|
2017-08-31 12:55:19 +00:00
|
|
|
END
|
2017-08-04 15:54:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const char * typeToString(Type type);
|
|
|
|
|
2017-08-31 12:55:19 +00:00
|
|
|
Type type = Type::UNKNOWN;
|
2017-08-04 15:54:00 +00:00
|
|
|
|
|
|
|
String target_dictionary;
|
2018-05-21 13:49:54 +00:00
|
|
|
String target_database;
|
|
|
|
String target_table;
|
2017-08-04 15:54:00 +00:00
|
|
|
|
2018-12-07 12:34:40 +00:00
|
|
|
String getID(char) const override { return "SYSTEM query"; }
|
2017-08-04 15:54:00 +00:00
|
|
|
|
|
|
|
ASTPtr clone() const override { return std::make_shared<ASTSystemQuery>(*this); }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2017-08-06 20:26:23 +00:00
|
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
2017-08-04 15:54:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-08-30 21:25:44 +00:00
|
|
|
}
|