diff --git a/tests/queries/0_stateless/03278_enum_in_unknown_value.reference b/tests/queries/0_stateless/03278_enum_in_unknown_value.reference new file mode 100644 index 00000000000..786e4a78984 --- /dev/null +++ b/tests/queries/0_stateless/03278_enum_in_unknown_value.reference @@ -0,0 +1,6 @@ +a +a +a +a +a +a diff --git a/tests/queries/0_stateless/03278_enum_in_unknown_value.sql b/tests/queries/0_stateless/03278_enum_in_unknown_value.sql new file mode 100644 index 00000000000..25072547c24 --- /dev/null +++ b/tests/queries/0_stateless/03278_enum_in_unknown_value.sql @@ -0,0 +1,22 @@ +DROP TABLE IF EXISTS t_enum_in_unknown_value; + +CREATE TABLE t_enum_in_unknown_value (e Enum('a'=1, 'b'=2)) ENGINE=Memory; + +INSERT INTO t_enum_in_unknown_value VALUES ('a'); + +SELECT * FROM t_enum_in_unknown_value; + +SELECT * FROM t_enum_in_unknown_value WHERE e IN ('a'); +SELECT * FROM t_enum_in_unknown_value WHERE e NOT IN ('a'); + +SELECT * FROM t_enum_in_unknown_value WHERE e IN ('a', 'b'); +SELECT * FROM t_enum_in_unknown_value WHERE e NOT IN ('a', 'b'); + +SELECT * FROM t_enum_in_unknown_value WHERE e IN ('a', 'c'); +SELECT * FROM t_enum_in_unknown_value WHERE e NOT IN ('a', 'c'); + +SELECT * FROM t_enum_in_unknown_value WHERE e IN ('a', 'b', 'c'); +SELECT * FROM t_enum_in_unknown_value WHERE e NOT IN ('a', 'b', 'c'); + +SELECT * FROM t_enum_in_unknown_value WHERE e IN ('c'); +SELECT * FROM t_enum_in_unknown_value WHERE e NOT IN ('c'); \ No newline at end of file