assert   
  - SQL_DIALECT 1
  + Statement failed, SQLSTATE = 28000
  + unsuccessful metadata update
  + -ALTER DATABASE failed
  + -no permission for ALTER access to DATABASE

LOG DETAILS:

2026-07-23 19:46:05.918
2026-07-23 19:46:05.918 act = <firebird.qa.plugin.Action object at [hex]>
2026-07-23 19:46:05.918 temp_db = WindowsPath('R:/Temp/qa/fbqa/test_1725/tmp_4067_1.fdb')
2026-07-23 19:46:05.918
2026-07-23 19:46:05.918     @pytest.mark.version('>=3')
2026-07-23 19:46:05.918     def test_1(act: Action, temp_db: Path):
2026-07-23 19:46:05.918         test_script = f"""
2026-07-23 19:46:05.918             set bail on;
2026-07-23 19:46:05.918             set list on;
2026-07-23 19:46:05.918             set sql dialect 1;
2026-07-23 19:46:05.918             create database 'localhost:{str(temp_db)}' page_size 4096 default character set win1251 collation win1251;
2026-07-23 19:46:05.918             select mon$sql_dialect as sql_dialect from mon$database;
2026-07-23 19:46:05.918             commit;
2026

[...SKIPPED...]

      """
2026-07-23 19:46:05.918         act.expected_stdout = expected_stdout
2026-07-23 19:46:05.918         act.isql(switches = ['-q'], input=test_script, connect_db=False, combine_output = True)
2026-07-23 19:46:05.918 >       assert act.clean_stdout == act.clean_expected_stdout
2026-07-23 19:46:05.918 E       assert
2026-07-23 19:46:05.918 E         - SQL_DIALECT 1
2026-07-23 19:46:05.918 E         + Statement failed, SQLSTATE = 28000
2026-07-23 19:46:05.918 E         + unsuccessful metadata update
2026-07-23 19:46:05.918 E         + -ALTER DATABASE failed
2026-07-23 19:46:05.918 E         + -no permission for ALTER access to DATABASE
2026-07-23 19:46:05.918
2026-07-23 19:46:05.918 tests\bugs\core_4067_test.py:38: AssertionError
2026-07-23 19:46:05.918 ---------------------------- Captured stdout setup ----------------------------
2026-07-23 19:46:05.918 Creating db: localhost:R:\Temp\qa\fbqa\test_1725\test.fdb [page_size=None, sql_dialect=None, charset='NONE', user=SYSDBA, password=masterkey]