| 78 | } |
| 79 | |
| 80 | static 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 |