Skip to content

Commit 95b12f4

Browse files
committed
Added/Updated tests\functional\sqlancer\doi_10_1145_3428279_example_10_test.py: adapted from article provided in SQLancer documentation.
1 parent 0760ad1 commit 95b12f4

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: n/a
5+
ISSUE: https://dl.acm.org/doi/pdf/10.1145/3428279
6+
TITLE: Unnexpectedly optimized VARIANCE(0) to FALSE
7+
DESCRIPTION:
8+
Manuel Rigger and Zhendong Su
9+
Finding Bugs in Database Systems via Query Partitioning
10+
https://dl.acm.org/doi/pdf/10.1145/3428279
11+
page 14 listing 10
12+
NOTES:
13+
"""
14+
15+
import pytest
16+
from firebird.qa import *
17+
18+
db = db_factory()
19+
20+
test_script = """
21+
set list on;
22+
create table t0 (c0 int);
23+
insert into t0 (c0) values (0);
24+
select t0.c0
25+
from t0
26+
group by t0.c0
27+
having not ( (select var_pop(0) from rdb$database where false) is null );
28+
"""
29+
30+
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
31+
32+
@pytest.mark.version('>=4.0')
33+
def test_1(act: Action):
34+
act.expected_stdout = """
35+
"""
36+
act.execute(combine_output = True)
37+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)