You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ACTUAL RESULT
- Unable to alter Database On Connect Trigger
- The following exception happen when it is tried to update an existing Database On Connect Trigger:
Error: *** IBPP::SQLException ***
Context: Statement::Prepare(
ALTER TRIGGER DATABASE_ON_CONNECT ACTIVE
ON CONNECT POSITION 0
AS
BEGIN
END )
Message: isc_dsql_prepare failed
It is not allowed to change type of DATABASE trigger.
In FB 2.5 the check was run at execution step of ALTER TRIGGER statement.
In FB 3 the syntax of ALTER TRIGGER was changed to not allow to specify new type for DATABASE triggers.
This works in all Firebird versions:
ALTER TRIGGER DATABASE_ON_CONNECT ACTIVE
AS
BEGIN
END
^
CREATE OR ALTER TRIGGER DATABASE_ON_CONNECT ACTIVE
ON CONNECT POSITION 0
AS
BEGIN
END
^
Submitted by: @luronumen
ACTUAL RESULT
- Unable to alter Database On Connect Trigger
- The following exception happen when it is tried to update an existing Database On Connect Trigger:
Error: *** IBPP::SQLException ***
Context: Statement::Prepare(
ALTER TRIGGER DATABASE_ON_CONNECT ACTIVE
ON CONNECT POSITION 0
AS
BEGIN
END )
Message: isc_dsql_prepare failed
SQL Message : -104
Invalid token
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, column 1
ON
EXPECTED RESULT
- The user should be able to update any Database On Connect Trigger without any issue
STEPS TO REPRODUCE THE ISSUE
1- Create a Database On Connect Trigger using the following DDL script:
SET TERM ^ ;
CREATE TRIGGER DATABASE_ON_CONNECT
ACTIVE ON CONNECT POSITION 0
AS
BEGIN
END^
SET TERM ; ^
2- Try to update the Database On Connect Trigger using the following DDL script:
SET TERM ^ ;
ALTER TRIGGER DATABASE_ON_CONNECT ACTIVE
ON CONNECT POSITION 0
AS
BEGIN
END^
SET TERM ; ^
IMPORTAN NOTES:
-This issue is NOT reproducible on Firebird 2.5.9
The text was updated successfully, but these errors were encountered: