Skip to content

Commit 0760ad1

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

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: n/a
5+
ISSUE: https://dl.acm.org/doi/pdf/10.1145/3428279
6+
TITLE: GROUP BY ignores COLLATE with case insensitive attribute
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 13 listing 9
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 collation name_coll for utf8 from unicode case insensitive;
23+
create domain dm_test varchar(1) character set utf8 collate name_coll;
24+
25+
create table t0 (c0 dm_test);
26+
insert into t0 (c0) values ( 'a');
27+
insert into t0 (c0) values ( 'A');
28+
select count(*) as grouping_cnt from (
29+
select t0.c0 from t0 group by t0.c0
30+
);
31+
"""
32+
33+
act = isql_act('db', test_script, substitutions=[('[ \t]+', ' ')])
34+
35+
@pytest.mark.version('>=3.0')
36+
def test_1(act: Action):
37+
act.expected_stdout = """
38+
GROUPING_CNT 1
39+
"""
40+
act.execute(combine_output = True)
41+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)