Skip to content

Commit 52424e9

Browse files
committed
Added/Updated tests\bugs\gh_8033_test.py: Checked 6.0.0.278 -- all fine.
1 parent 693244b commit 52424e9

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

tests/bugs/gh_8033_test.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#coding:utf-8
2+
3+
"""
4+
ID: issue-8033
5+
ISSUE: https://github.com/FirebirdSQL/firebird/issues/8033
6+
TITLE: Invalid result when string compared with indexed numeric(x,y) field where x > 18 and y != 0
7+
NOTES:
8+
[11.03.2024] pzotov.
9+
Confirmed bug in 6.0.0.276.
10+
Checked 6.0.0.278 -- all fine.
11+
"""
12+
13+
import pytest
14+
from firebird.qa import *
15+
16+
db = db_factory()
17+
18+
test_script = """
19+
set list on;
20+
recreate table mi8 (v numeric (30, 4));
21+
insert into mi8 values(12.345);
22+
commit;
23+
create index i8 on mi8(v);
24+
set count on;
25+
select v as v1 from mi8 where v = 12.345;
26+
select v as v2 from mi8 where v = '12.345';
27+
"""
28+
29+
act = isql_act('db', test_script, substitutions = [('[ \t]+', ' ')])
30+
31+
expected_stdout = """
32+
V1 12.3450
33+
Records affected: 1
34+
35+
V2 12.3450
36+
Records affected: 1
37+
"""
38+
39+
@pytest.mark.version('>=6.0')
40+
def test_1(act: Action):
41+
act.expected_stdout = expected_stdout
42+
act.execute(combine_output = True)
43+
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)