Issue Details (XML | Word | Printable)

Key: CORE-4376
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Adriano dos Santos Fernandes
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Preparation of erroneous DDL statement does not show the main command failed

Created: 26/Mar/14 04:52 PM   Updated: 11/Mar/16 04:20 PM
Component/s: None
Affects Version/s: 3.0 Alpha 1, 3.0 Alpha 2
Fix Version/s: 3.0 Beta 1

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.

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


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Zotov added a comment - 24/Apr/15 04:34 PM
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 ?