Skip to content

Commit

Permalink
add end2end test with problematic queries
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Oct 11, 2024
1 parent ab3d000 commit f1b52ea
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions go/test/endtoend/vtgate/vitess_tester/expressions/expressions.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
select (not (1 like ('a' is null)));
select not (1 like ('a' is null));
select 1 not like ('a' is null);
select (not (1 like 0));
select 1 not like 0;
# This file contains queries that test expressions in Vitess.
# We've found a number of bugs around precedences that we want to test.
CREATE TABLE t0
(
c1 BIT,
INDEX idx_c1 (c1)
);

INSERT INTO t0(c1)
VALUES ('');


SELECT *
FROM t0;

SELECT ((t0.c1 = 'a'))
FROM t0;

SELECT *
FROM t0
WHERE ((t0.c1 = 'a'));


SELECT (1 LIKE ('a' IS NULL));
SELECT (NOT (1 LIKE ('a' IS NULL)));

SELECT (~ (1 || 0)) IS NULL;

SELECT 1
WHERE (~ (1 || 0)) IS NULL;

0 comments on commit f1b52ea

Please sign in to comment.