Skip to content

Commit dc19797

Browse files
committed
Added/Updated tests\bugs\gh_7652_test.py: Adjusted for FB 6.x: it is MANDATORY to specify schema PLG$PROFILER. when querying created profiler tables. See notes.
1 parent 3b0bcc4 commit dc19797

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/bugs/gh_7652_test.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
NOTES:
2424
Compared 5.0.0.1087 (26-JUN-2023) vs 5.0.0.1088 (27-JUN-2023)
2525
Checked on 6.0.0.395
26+
27+
[13.07.2025] pzotov
28+
Adjusted for FB 6.x: it is MANDATORY to specify schema `PLG$PROFILER.` when querying created profiler tables.
29+
See doc/sql.extensions/README.schemas.md, section title: '### gbak'; see 'SQL_SCHEMA_PREFIX' variable here.
30+
Checked on 6.0.0.970; 5.0.3.1683.
2631
"""
2732
import pytest
2833
from firebird.qa import *
@@ -39,6 +44,7 @@ def strip_white(value):
3944
@pytest.mark.version('>=5.0')
4045
def test_1(act: Action, capsys):
4146

47+
SQL_SCHEMA_PREFIX = '' if act.is_version('<6') else 'PLG$PROFILER.'
4248
actual_out = ''
4349
test_sql = f"""
4450
set bail on;
@@ -89,15 +95,14 @@ def test_1(act: Action, capsys):
8995
select
9096
iif( sum( iif(request_id = 0, 1, 0) ) > 0, 'NON_ZERO', 'ZERO' ) as requests_cnt_zero_request_id
9197
,iif( sum( iif(request_id = 0, 0, 1) ) > 0, 'NON_ZERO', 'ZERO' ) as requests_cnt_non_zero_req_id
92-
from plg$prof_requests;
98+
from {SQL_SCHEMA_PREFIX}plg$prof_requests;
9399
94100
select
95101
iif( sum( iif(request_id = 0, 1, 0) ) > 0, 'NON_ZERO', 'ZERO' ) as psql_stats_cnt_zero_request_id
96102
,iif( sum( iif(request_id = 0, 0, 1) ) > 0, 'NON_ZERO', 'ZERO' ) as psql_stats_cnt_non_zero_req_id
97-
from plg$prof_psql_stats;
103+
from {SQL_SCHEMA_PREFIX}plg$prof_psql_stats;
98104
"""
99105

100-
101106
debug_message_sttm = "select 'DETAILED_REQUESTS: OFF' as msg from rdb$database"
102107
profiler_start_sttm = "select sign(rdb$profiler.start_session('prof_ssn_no_details')) from rdb$database"
103108
act.isql(input = test_sql % locals(), combine_output = True)

0 commit comments

Comments
 (0)