-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add end2end test with problematic queries
Signed-off-by: Andres Taylor <[email protected]>
- Loading branch information
Showing
1 changed file
with
30 additions
and
5 deletions.
There are no files selected for viewing
35 changes: 30 additions & 5 deletions
35
go/test/endtoend/vtgate/vitess_tester/expressions/expressions.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |