File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
tests/functional/sqlancer Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ #coding:utf-8
2+
3+ """
4+ ID: n/a
5+ ISSUE: https://github.com/tidb-challenge-program/bug-hunting-issue/issues/19
6+ TITLE: UNIQUE constraint on DECIMAL/floating-point columns causes incorrect result for NULL in AND
7+ DESCRIPTION:
8+ https://github.com/sqlancer/sqlancer/blob/main/CONTRIBUTING.md#unfixed-bugs
9+ https://github.com/sqlancer/sqlancer/blob/4c20a94b3ad2c037e1a66c0b637184f8c20faa7e/src/sqlancer/tidb/TiDBBugs.java
10+ """
11+
12+ import pytest
13+ from firebird .qa import *
14+
15+ db = db_factory ()
16+
17+ test_script = """
18+ set list on;
19+ CREATE TABLE t0(c0 DOUBLE PRECISION UNIQUE);
20+ INSERT INTO t0(c0) VALUES (NULL);
21+ SELECT t0.c0 FROM t0 WHERE NOT (t0.c0 is null AND true); -- expected: {}, actual: {NULL}
22+ """
23+
24+ act = isql_act ('db' , test_script )
25+
26+ @pytest .mark .version ('>=3.0' )
27+ def test_1 (act : Action ):
28+ act .execute (combine_output = True )
29+ assert act .clean_stdout == ''
You can’t perform that action at this time.
0 commit comments