Skip to content

Commit 3b0bcc4

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

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/bugs/gh_7553_test.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
NOTES:
1212
Confirmed bug on 5.0.0.1030.
1313
Checked on 5.0.0.1033 SS/CS (intermediate build, timestamp: 26.04.2023 08:00) -- all fine.
14+
15+
[13.07.2025] pzotov
16+
Adjusted for FB 6.x: it is MANDATORY to specify schema `PLG$PROFILER.` when querying created profiler tables.
17+
See doc/sql.extensions/README.schemas.md, section title: '### gbak'; see 'SQL_SCHEMA_PREFIX' variable here.
18+
Checked on 6.0.0.970; 5.0.3.1683.
1419
"""
1520
import locale
1621
import re
@@ -26,6 +31,8 @@
2631
@pytest.mark.version('>=5.0')
2732
def test_1(act: Action, capsys):
2833

34+
SQL_SCHEMA_PREFIX = '' if act.is_version('<6') else 'PLG$PROFILER.'
35+
2936
# Get Firebird log before test
3037
fb_log_init = act.get_firebird_log()
3138

@@ -51,7 +58,7 @@ def test_1(act: Action, capsys):
5158
with
5259
p_ssn as (
5360
select profile_id
54-
from plg$prof_sessions
61+
from {SQL_SCHEMA_PREFIX}plg$prof_sessions
5562
order by 1 desc rows 1
5663
)
5764
select
@@ -61,8 +68,8 @@ def test_1(act: Action, capsys):
6168
,r.open_counter as p_recsource_open_counter
6269
,r.fetch_counter as p_recsource_fetch_counter
6370
from p_ssn s
64-
join plg$prof_psql_stats_view as q on s.profile_id = q.profile_id
65-
join plg$prof_record_source_stats_view r on s.profile_id = r.profile_id
71+
join {SQL_SCHEMA_PREFIX}plg$prof_psql_stats_view as q on s.profile_id = q.profile_id
72+
join {SQL_SCHEMA_PREFIX}plg$prof_record_source_stats_view r on s.profile_id = r.profile_id
6673
order by 1,2,3
6774
;
6875
"""

0 commit comments

Comments
 (0)