MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / isFederatedServerSetupSetCommand

Function isFederatedServerSetupSetCommand

src/Server/MySQLHandler.cpp:80–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static bool isFederatedServerSetupSetCommand(const String & query)
81{
82 re2::RE2::Options regexp_options;
83 regexp_options.set_case_sensitive(false);
84 static const re2::RE2 expr(
85 "(^(SET NAMES(.*)))"
86 "|(^(SET character_set_results(.*)))"
87 "|(^(SET FOREIGN_KEY_CHECKS(.*)))"
88 "|(^(SET AUTOCOMMIT(.*)))"
89 "|(^(SET sql_mode(.*)))"
90 "|(^(SET @@(.*)))"
91 "|(^(SET SESSION TRANSACTION ISOLATION LEVEL(.*)))", regexp_options);
92 chassert(expr.ok());
93 return re2::RE2::FullMatch(query, expr);
94}
95
96/// Always return an empty set with appropriate column definitions for SHOW WARNINGS queries
97/// See also: https://dev.mysql.com/doc/refman/8.0/en/show-warnings.html

Callers 1

comQueryMethod · 0.85

Calls 1

okMethod · 0.45

Tested by

no test coverage detected