Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to save the connection information in the ON CONNECT trigger, if the connection is created by the gbak [CORE4928] #5219

Closed
firebird-issue-importer opened this issue Sep 8, 2015 · 4 comments

Comments

@firebird-issue-importer
Copy link

firebird-issue-importer commented Sep 8, 2015

Submitted by: @sim1984

recreate table att_log (att_id int, att_name varchar(50), att_user varchar(31), att_addr varchar(25), att_prot varchar(15), att_auth varchar(15), att_dts timestamp default 'now');

commit;

set term ^;
create or alter trigger trg_connect active on connect as
begin
in autonomous transaction do
insert into att_log(att_id, att_name, att_user, att_addr, att_prot, att_auth)
select
mon$attachment_id
,mon$attachment_name
,mon$user
,mon$remote_address
,mon$remote_protocol
,mon$auth_method
from mon$attachments
--where mon$attachment_id = current_connection
;
end
^
set term ;^
commit;

quit;

If you try to make a backup

gbak -b localhost/3333:C:\FBTESTING\qa\fbt-repo\tmp\E30.fdb C:\FBTESTING\qa\fbt-repo\tmp\E30.fbk

gbak: ERROR:INSERT operation is not allowed for system table ATT_LOG
gbak: ERROR: At trigger 'TRG_CONNECT' line: 4, col: 3
gbak:Exiting before completion due to errors

or

fbsvcmgr localhost:service_mgr action_backup dbname C:\FBTESTING\qa\fbt-repo\tmp\E30.fdb bkp_file C:\FBTESTING\qa\fbt-repo\tmp\E30.fbk

INSERT operation is not allowed for system table ATT_LOG
-At trigger 'TRG_CONNECT' line: 4, col: 3
-Exiting before completion due to errors

Commits: 2a1d6e2 10d3c38 FirebirdSQL/fbt-repository@e9fa8e5 FirebirdSQL/fbt-repository@5710a08

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 8, 2015

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 10, 2015

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 RC 1 [ 10584 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 11, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 11, 2015

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants