-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Error in EXECUTE STATEMENT inside CONNECT / TRANSACTION START triggers [CORE1693] #2118
Comments
Commented by: @AlexPeshkoff Adriano, you were telling in Architect that you have an idea how to make it work? Something like creating temporal database handle if permanent is missing - like we do with transactions now? BTW, TRANSACTION START trigger works except first time when connecting to database. And it makes me wonder - what transaction is started during database attach and is it really worth running TRANSACTION START triggers for it? |
Commented by: @asfernandes Alex, I was supposing that creating handle in y-valve before calling GDS attach function, and passing direct y-valve handle address to GDS argument handle would be sufficient. It's not, and reason is related to your question about the first transaction start. GetWhyAttachment works in DSQL environment, so it don't work correctly if you didn't issued any DSQL command before. Creating temporal handle solution works, and that completely eliminates GetWhyAttachment function. It would requires we use in the engine the subsystem number 1 to create the handle. Ugly, but not a very big problem for the current code. |
Modified by: @pcisarWorkflow: jira [ 13821 ] => Firebird [ 14125 ] |
Commented by: @asfernandes Fixed with DSQL/engine integration. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Alpha 1 [ 10224 ] assignee: Dmitry Yemanov [ dimitr ] |
Commented by: @dyemanov What a nice side effect! :-) |
Commented by: @pcisar QA test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovQA Status: No test => Done successfully |
Submitted by: @asfernandes
Is duplicated by CORE2178
Is related to QA335
By the same reasons already discussed for external languages implementation, EXECUTE STATEMENT doesn't work in CONNECT / TRANSACTION START triggers.
isql -term !
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 't.fdb'!
SQL> create trigger t_connect on connect as
CON> declare v integer;
CON> begin
CON> execute statement 'select 1 from rdb$database' into v;
CON> end!
isql t.fdb
Statement failed, SQLCODE = -904
invalid database handle (no active connection)
-At trigger 'T_CONNECT' line: 4, col: 3
Use CONNECT or CREATE DATABASE to specify a database
The text was updated successfully, but these errors were encountered: