2323NOTES:
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"""
2732import pytest
2833from firebird .qa import *
@@ -39,6 +44,7 @@ def strip_white(value):
3944@pytest .mark .version ('>=5.0' )
4045def 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