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
'Unsuccessful execution' error when updating a record [CORE2811] #1179
Comments
Modified by: Paul Gardner (cantak)Attachment: test.zip [ 11541 ] description: Create the following database/trigger, and update the single record in the single table. You'll receive the message "Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements. CREATE DATABASE 'C:\test.fdb' CREATE TABLE NEW_TABLE ( INSERT INTO NEW_TABLE (NEW_FIELD) VALUES (4); SET TERM ^ ; CREATE OR ALTER TRIGGER NEW_TRIGGER FOR NEW_TABLE -- Remove this exit command and the update will work. I know it's not needed, -- Now update the record to see the error: => Create the following database/trigger, and update the single record in the single table. You'll receive the message "Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements. CREATE DATABASE 'C:\test.fdb' CREATE TABLE NEW_TABLE ( INSERT INTO NEW_TABLE (NEW_FIELD) VALUES (4); SET TERM ^ ; CREATE OR ALTER TRIGGER NEW_TRIGGER FOR NEW_TABLE -- Remove this exit command and the update will work. I know it's not needed, -- Now update the record to see the error: |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Commented by: @dyemanov You will need to recreate/recompile the trigger in the new FB build (RC2 or the next snapshot) in order to have this bug fixed. |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 RC2 [ 10372 ] |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Paul Gardner (cantak)
Is related to QA428
Attachments:
test.zip
Create the following database/trigger, and update the single record in the single table. You'll receive the message "Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.
action cancelled by trigger (0) to preserve data integrity."
CREATE DATABASE 'C:\test.fdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 8192
DEFAULT CHARACTER SET NONE;
CREATE TABLE NEW_TABLE (
NEW_FIELD NUMERIC(9,2)
);
INSERT INTO NEW_TABLE (NEW_FIELD) VALUES (4);
SET TERM ^ ;
CREATE OR ALTER TRIGGER NEW_TRIGGER FOR NEW_TABLE
ACTIVE AFTER UPDATE POSITION 20
AS
-- Typically this variable would be used in the trigger. To make it simple, I've
-- removed all code possible to still get the error.
declare variable NewHours numeric(9,2) = 0;
BEGIN
-- Remove the coalesce and the update will work.
-- Remove the multiplication and the update will work.
-- Remove this unneeded variable and the update will work.
NewHours = coalesce(new.new_field * (0), 0);
-- Remove this exit command and the update will work. I know it's not needed,
-- however in the scenario I ran into this there was much more code after the
-- exit, and the exit was inside an IF clause. This is just the simplest way of reproducing it.
exit;
end
^
-- Now update the record to see the error:
update new_table set new_field = 6;
Commits: 2537234
The text was updated successfully, but these errors were encountered: