55ISSUE: 5903
66TITLE: string right truncation on restore of security db
77DESCRIPTION:
8- NOTES:
9- [25.10.2019] Refactored
10- restored DB state must be changed to full shutdown in order to make sure tha all attachments are gone.
11- Otherwise got on CS: "WindowsError: 32 The process cannot access the file because it is being used by another process".
128JIRA: CORE-5637
139FBTEST: bugs.core_5637
10+ NOTES:
11+ [25.10.2019] pzotov
12+ Refactored: restored DB state must be changed to full shutdown in order to make sure tha all attachments are gone.
13+ Otherwise got on CS: "WindowsError: 32 The process cannot access the file because it is being used by another process".
14+
15+ [14.07.2025] pzotov
16+ FB 6.x restore specific for backups created in FB 3.x ... 5.x: it adds in restore output messages related to migrating
17+ of some objects related to SRP plugin to "PLG$SRP" schema, e.g.:
18+ ===================
19+ gbak:migrating SRP plugin objects to schema "PLG$SRP"
20+ gbak: WARNING:error migrating SRP plugin objects to schema "PLG$SRP". Plugin objects will be in inconsistent state:
21+ gbak: WARNING:unsuccessful metadata update
22+ gbak: WARNING: DROP VIEW "PUBLIC"."PLG$SRP_VIEW" failed
23+ gbak: WARNING: DELETE operation is not allowed for system table "SYSTEM"."RDB$SECURITY_CLASSES"
24+ ...
25+ ===================
26+ See doc/sql.extensions/README.schemas.md, section title: '### gbak'; see 'SQL_SCHEMA_PREFIX' variable here.
27+ Currently these messages are suppressed.
28+ Checked on 6.0.0.970; 5.0.3.1668.
1429"""
1530
1631import pytest
@@ -32,19 +47,20 @@ def test_1(act: Action, sec_fbk: Path, sec_fdb: Path):
3247 zipped_fbk_file = zipfile .Path (act .files_dir / 'core_5637.zip' , at = 'core5637-security3.fbk' )
3348 sec_fbk .write_bytes (zipped_fbk_file .read_bytes ())
3449 #
35- log_before = act .get_firebird_log ()
50+ fb_log_before = act .get_firebird_log ()
3651 # Restore security database
3752 with act .connect_server () as srv :
3853 srv .database .restore (database = sec_fdb , backup = sec_fbk , flags = SrvRestoreFlag .REPLACE )
39- restore_log = srv .readlines ()
54+ gbak_restore_log = srv .readlines ()
4055 #
41- log_after = act .get_firebird_log ()
56+ fb_log_after = act .get_firebird_log ()
57+
4258 #
4359 srv .database .validate (database = sec_fdb )
4460 validation_log = srv .readlines ()
4561 srv .database .shutdown (database = sec_fdb , mode = ShutdownMode .FULL , method = ShutdownMethod .FORCED , timeout = 0 )
4662 #
4763 #
48- assert [line for line in restore_log if 'ERROR' in line .upper ()] == []
64+ assert [line for line in gbak_restore_log if 'ERROR' in line .upper () and not 'gbak: WARNING:' in line ] == []
4965 assert [line for line in validation_log if 'ERROR' in line .upper ()] == []
50- assert list (unified_diff (log_before , log_after )) == []
66+ assert list (unified_diff (fb_log_before , fb_log_after )) == []
0 commit comments