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

Preparation of erroneous DDL statement does not show the main command failed [CORE4376] #4698

Closed
firebird-automations opened this issue Mar 26, 2014 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @asfernandes

In Firebird 3, execution of erroneous DDL statement shows information about the main command. Exemple: CREATE PACKAGE NEW_PACKAGE failed.

However, this part of the error message is being not shown when the command fail at the prepare time.

Commits: d1dbfe7 FirebirdSQL/fbt-repository@de7eb75

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 1 [ 10332 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Consider following script containing several errors that prevent it from successful compilation:

=======
recreate table test1(id int, name varchar(30));
commit;

set term ^;
create or alter procedure sp_test(a_id int) returns (o_name varchar(30)) as
begin
select text from test where id = :a_id into o_name;
suspend;
end
^

create or alter package pkg_test as
begin
procedure sp_test1a(a_id int) returns (o_name varchar(30));
procedure sp_test1b(a_id int) returns (o_name varchar(30));
procedure sp_test1c(a_id int) returns (o_name varchar(30));
end
^

recreate package body pkg_test as
begin

procedure sp_test1a(a_id int) returns (o_name varchar(30)) as
begin
select name from test1 where id = :a_id into o_name;
suspend;
end

procedure sp_test1b(a_id int) returns (o_name varchar(30)) as
begin
select non_existent_field from test1 where id = :a_id into o_name;
suspend;
end

procedure sp_test1c(a_id int) returns (o_name varchar(30)) as
begin
select name from non_existent_table where id = :a_id into o_name;
suspend;
end
end
^

STDERR in Alpha2 (WI-T3.0.0.30809):

Statement failed, SQLSTATE = 42S02
unsuccessful metadata update
-CREATE OR ALTER PROCEDURE SP_TEST failed
-Dynamic SQL Error
-SQL error code = -204
-Table unknown
-TEST

After line 4 in file c4376.sql

Statement failed, SQLSTATE = 42S22
unsuccessful metadata update
-RECREATE PACKAGE BODY PKG_TEST failed
-CREATE OR ALTER PROCEDURE SP_TEST1B failed <<<<<<<<<<<<<<<<<< !!! <<<<<<<<<<<<<<
-Dynamic SQL Error
-SQL error code = -206
-Column unknown

After line 18 in file c4376.sql

STDERR in Beta2 (WI-T3.0.0.31807):

Statement failed, SQLSTATE = 42S02
unsuccessful metadata update
-CREATE OR ALTER PROCEDURE SP_TEST failed
-Dynamic SQL Error
-SQL error code = -204
-Table unknown
-TEST
-At line 3, column 27
After line 4 in file c4376.sql

Statement failed, SQLSTATE = 42S22
unsuccessful metadata update
-RECREATE PACKAGE BODY PKG_TEST failed

-Dynamic SQL Error
-SQL error code = -206
-Column unknown
-NON_EXISTENT_FIELD
-At line 12, column 31
After line 18 in file c4376.sql

Line in STDERR for *ALPHA2* marked by "<<< !!! <<<" is absent in STDERR for Beta2, but this line also has useful info - name of procedure 'SP_TEST1B' which could not compiled.

Is this some kind of regression ?

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred

Test Details: Wait for reply about issue of 24/Apr/15 04:34 PM.
On WI-T3.0.0.31855 output in STDERR is the same: has NO line
"-CREATE OR ALTER PROCEDURE SP_TEST1B failed"
which can be useful for the search of exact error place.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Test Details: Wait for reply about issue of 24/Apr/15 04:34 PM.
On WI-T3.0.0.31855 output in STDERR is the same: has NO line
"-CREATE OR ALTER PROCEDURE SP_TEST1B failed"
which can be useful for the search of exact error place.

=>

Wait for reply about issue of 24/Apr/15 04:34 PM.
On WI-T3.0.0.31855 output in STDERR is the same: has NO line
"-CREATE OR ALTER PROCEDURE SP_TEST1B failed"
which can be useful for the search of exact error place.

WI-T4.0.0.32393 Firebird 4.0 Unstable: still have no clue about why this ticket considered as fixed.
Name of unknown COLUMN - yes, it's shown; but name of _packaged_ procedure which tries to use it - no, and it was lost comparing to Alpha-2.

WI-T3.0.0.30809:

-RECREATE PACKAGE BODY PKG_TEST failed
-CREATE OR ALTER PROCEDURE SP_TEST1B failed <<<<<< THIS WAS LOST <<<
-Dynamic SQL Error
-SQL error code = -206
-Column unknown

WI-T4.0.0.32393:

-RECREATE PACKAGE BODY PKG_TEST failed
-Dynamic SQL Error
-SQL error code = -206
-Column unknown
-NON_EXISTENT_FIELD

Wait for reply on letter to dimitr, 11/mar/2016 19:13

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred => Done successfully

Test Details: Wait for reply about issue of 24/Apr/15 04:34 PM.
On WI-T3.0.0.31855 output in STDERR is the same: has NO line
"-CREATE OR ALTER PROCEDURE SP_TEST1B failed"
which can be useful for the search of exact error place.

WI-T4.0.0.32393 Firebird 4.0 Unstable: still have no clue about why this ticket considered as fixed.
Name of unknown COLUMN - yes, it's shown; but name of _packaged_ procedure which tries to use it - no, and it was lost comparing to Alpha-2.

WI-T3.0.0.30809:

-RECREATE PACKAGE BODY PKG_TEST failed
-CREATE OR ALTER PROCEDURE SP_TEST1B failed <<<<<< THIS WAS LOST <<<
-Dynamic SQL Error
-SQL error code = -206
-Column unknown

WI-T4.0.0.32393:

-RECREATE PACKAGE BODY PKG_TEST failed
-Dynamic SQL Error
-SQL error code = -206
-Column unknown
-NON_EXISTENT_FIELD

Wait for reply on letter to dimitr, 11/mar/2016 19:13

=>

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