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

ALTER TRIGGER / PROCEDURE wrong error message [CORE2374] #2796

Closed
firebird-automations opened this issue Mar 14, 2009 · 8 comments
Closed

ALTER TRIGGER / PROCEDURE wrong error message [CORE2374] #2796

firebird-automations opened this issue Mar 14, 2009 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Mustafa YILMAZ (myilmaz)

Is related to QA543

Votes: 1

ALTER PROCEDURE TEST1
AS
begin
IF (A = B) then
B = 1;
END

error message is
"Column unknown A At line 4, column 7"
but procedure not exists (correct message "Procedure TEST1 not found")

same result for ALTER TRIGGER

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Your logic is not correct. Why would you assume that procedure not found error *must* be before compile the body?

@firebird-automations
Copy link
Collaborator Author

Commented by: Mustafa YILMAZ (myilmaz)

PROCEDURE short sample but real problem with TRIGGERs
long sample:

CREATE TABLE TESTT
(
FIELD1 INTEGER
);

COMMIT;

CREATE EXCEPTION NOTMODIFY 'not modify';
COMMIT;

SET TERM ^ ;

CREATE TRIGGER TEST_BU FOR TESTT
BEFORE UPDATE
AS
BEGIN
IF (NEW.FIELD1 <> NEW.FIELD1) THEN -- simple copy paste problem second NEW must be OLD
EXCEPTION NOTMODIFY;
END ^

COMMIT ^

ALTER TRIGGER TEST_B
AS
BEGIN
IF (NEW.FIELD1 <> OLD.FIELD1) THEN -- fix field name problem but trigger name misspelling, correct TEST_BU
EXCEPTION NOTMODIFY;
END ^

now error:
Column unknown
NEW.FIELD1
At line 4, column 11

but I am sure FIELD1 exists in TESTT
error message not help

@firebird-automations
Copy link
Collaborator Author

Commented by: Paulius Pazera (ppazera)

I agree that current 'column unknown' error (when such column actually exists) is wrong and misleading (when altering non-existing trigger)

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA543 [ QA543 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Test created.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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