mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-13 08:52:15 +00:00
fix(mysql): route named SHOW variables to query handler
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@ static MYSQL_CONN_JAVA_PATTERN: Lazy<Regex> =
|
||||
static SHOW_LOWER_CASE_PATTERN: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new("(?i)^(SHOW VARIABLES LIKE 'lower_case_table_names'(.*))").unwrap());
|
||||
static SHOW_VARIABLES_LIKE_PATTERN: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new("(?i)^(SHOW VARIABLES( LIKE (.*))?)").unwrap());
|
||||
Lazy::new(|| Regex::new("(?i)^(SHOW VARIABLES(?: LIKE (.*))?\\s*;?\\s*)$").unwrap());
|
||||
static SHOW_WARNINGS_PATTERN: Lazy<Regex> =
|
||||
Lazy::new(|| Regex::new("(?i)^(/\\* ApplicationName=.*)?SHOW WARNINGS").unwrap());
|
||||
|
||||
@@ -416,6 +416,10 @@ mod test {
|
||||
+---------------+-------+";
|
||||
test(query, expected);
|
||||
|
||||
let query = "show variables enable_aggregate_dynamic_filter_pushdown";
|
||||
let output = check(query, QueryContext::arc(), session.clone());
|
||||
assert!(output.is_none());
|
||||
|
||||
let query = "show variables like 'lower_case_table_names'";
|
||||
let expected = "\
|
||||
+------------------------+-------+
|
||||
|
||||
Reference in New Issue
Block a user