File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ #coding:utf-8
2+
3+ """
4+ ID: issue-7710
5+ ISSUE: https://github.com/FirebirdSQL/firebird/issues/7710
6+ TITLE: Expression index - more than one null value cause attempt to store duplicate value error
7+ DESCRIPTION:
8+ NOTES:
9+ [17.08.2023] pzotov
10+ Confirmed problem on 5.0.0.1163.
11+ Checked on intermediate build 5.0.0.1164.
12+ """
13+
14+ import pytest
15+ from firebird .qa import *
16+
17+ db = db_factory (charset = 'utf8' )
18+
19+ test_script = """
20+ set bail on;
21+ create table test (
22+ field1 char(10) not null
23+ );
24+ commit;
25+
26+ insert into test(field1) values ('N');
27+ insert into test(field1) values ('N');
28+ insert into test(field1) values ('I');
29+ commit;
30+ create unique index test_i1 on test computed by (iif(field1 = 'I', 'I', null));
31+ commit;
32+ set heading off;
33+ select 'Ok.' from rdb$database;
34+ """
35+
36+ act = isql_act ('db' , test_script )
37+
38+ expected_stdout = """
39+ Ok.
40+ """
41+
42+ @pytest .mark .version ('>=3.0' )
43+ def test_1 (act : Action ):
44+ act .expected_stdout = expected_stdout
45+ act .execute (combine_output = True )
46+ assert act .clean_stdout == act .clean_expected_stdout
You can’t perform that action at this time.
0 commit comments