File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ #coding:utf-8
2
+
3
+ """
4
+ ID: n/a
5
+ ISSUE: https://github.com/FirebirdSQL/firebird/commit/45b40b86b94bec9deadcab5d376e079700cd68aa
6
+ TITLE: Fix old problem triggered by schemas changes (related to tests/bugs/gh_8057_test.py)
7
+ DESCRIPTION:
8
+ This test contains smallest part of test for #8057 that caused weird error
9
+ "message length error (encountered 506, expected 253)" on attempting
10
+ to create trivial function after trying to drop non-existing filter.
11
+ Dropping objects in bugs/gh_8057_test.py is not mandatory so this test preserves the issue
12
+ which can disappear if gh_8057_test.py will be simplified (by removing unneeded code).
13
+ NOTES:
14
+ [18.07.2025] pzotov
15
+ Discussed with Adriano, 18.07.2025 08:24
16
+ Checked on 6.0.0.1039-45b40b8.
17
+ """
18
+
19
+ import pytest
20
+ from firebird .qa import *
21
+
22
+ test_sql = f"""
23
+ set bail on;
24
+ set heading off;
25
+ set term ^;
26
+ execute block as
27
+ declare v_sttm varchar(1024);
28
+ begin
29
+ begin
30
+ v_sttm = 'drop filter foo';
31
+ execute statement v_sttm;
32
+ when any do
33
+ begin
34
+ end
35
+ end
36
+ execute statement 'create or alter function bar() returns int as begin return 1; end';
37
+ end
38
+ ^
39
+ set term ;^
40
+ commit;
41
+ select 'Ok' from rdb$database;
42
+ """
43
+
44
+ db = db_factory ()
45
+ act = isql_act ('db' , test_sql )
46
+
47
+ @pytest .mark .version ('>=6' )
48
+ def test_1 (act : Action ):
49
+ act .expected_stdout = f"""
50
+ Ok
51
+ """
52
+ act .execute (combine_output = True )
53
+ assert act .clean_stdout == act .clean_expected_stdout
You can’t perform that action at this time.
0 commit comments