Support mysql RLIKE and REGEXP binary operators (#1017)

This commit is contained in:
Ophir LOJKINE 2023-10-20 22:13:22 +02:00 committed by GitHub
parent 88510f6625
commit c03586b727
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 53 additions and 3 deletions

View file

@ -1454,6 +1454,18 @@ fn parse_show_variables() {
mysql_and_generic().verified_stmt("SHOW VARIABLES WHERE value = '3306'");
}
#[test]
fn parse_rlike_and_regexp() {
for s in &[
"SELECT 1 WHERE 'a' RLIKE '^a$'",
"SELECT 1 WHERE 'a' REGEXP '^a$'",
"SELECT 1 WHERE 'a' NOT RLIKE '^a$'",
"SELECT 1 WHERE 'a' NOT REGEXP '^a$'",
] {
mysql_and_generic().verified_only_select(s);
}
}
#[test]
fn parse_kill() {
let stmt = mysql_and_generic().verified_stmt("KILL CONNECTION 5");