Skip to content

Commit 6b7afbe

Browse files
committed
Added/Updated tests\functional\sqlancer\doi_10_1145_3428279_example_06_test.py: adapted from article provided in SQLancer documentation.
1 parent 37a89d3 commit 6b7afbe

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: n/a
5+
ISSUE: https://dl.acm.org/doi/pdf/10.1145/3428279
6+
TITLE: Failed to fetch a row from a view.
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 12 listing 6
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+
recreate table t0 (c0 int);
23+
recreate view v0 as select t0.c0, true as c1 from t0;
24+
insert into t0 values (0);
25+
select v0.c0 from v0 cross join t0 where v0.c1;
26+
commit;
27+
28+
"""
29+
30+
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
31+
32+
@pytest.mark.version('>=3.0')
33+
def test_1(act: Action):
34+
act.expected_stdout = """
35+
C0 0
36+
"""
37+
act.execute(combine_output = True)
38+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)