Skip to content

Commit 0c69ca8

Browse files
committed
Added/Updated tests\functional\sqlancer\tidb_16028_test.py: adapted from article provided in SQLancer documentation.
1 parent 7070f21 commit 0c69ca8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: 16028
5+
ISSUE: https://github.com/pingcap/tidb/issues/16028
6+
TITLE: Incorrect result when comparing a FLOAT/DOUBLE UNSIGNED with a negative number
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+
CREATE TABLE t0(c0 double precision unique);
19+
INSERT INTO t0(c0) VALUES (0);
20+
SELECT * FROM t0 WHERE t0.c0 = -1; -- expected: {}, actual: {0}
21+
"""
22+
23+
act = isql_act('db', test_script)
24+
25+
@pytest.mark.version('>=3.0')
26+
def test_1(act: Action):
27+
act.execute(combine_output = True)
28+
assert act.clean_stdout == ''

0 commit comments

Comments
 (0)