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

Inconsistent column/line references when PSQL definitions return errors [CORE5404] #5677

Closed
firebird-issue-importer opened this issue Nov 21, 2016 · 8 comments

Comments

@firebird-issue-importer

Submitted by: @helebor

Is duplicated by CORE5873

Attachments:
c5404.sql

line/column numbers are not shown in the error message for first SP,
but are shown in the error message for second SP:

SET TERM ^;
create or alter procedure REP_TMP_CCDM_60106
as
declare variable tmpInt smallint;
begin
select "" from rdb$database into tmpInt;
end
^
SET TERM ;^

/*Statement failed, SQLSTATE = 42S22
Dynamic SQL Error
-SQL error code = -206
-Column unknown*/

SET TERM ^;
create or alter procedure REP_TMP_CCDM_60106
as
declare variable tmpInt smallint;
begin
select "d" from rdb$database into tmpInt;
end
^
SET TERM ;^

/*Statement failed, SQLSTATE = 42S22
Dynamic SQL Error
-SQL error code = -206
-Column unknown
-d
-At line 5, column 14*/

The above report came from a v.2.5.6 user, dialect 3.
Tested also in v.3.0.1, although the error message for the first case is more
accurate:
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Zero length identifiers are not allowed

Commits: 0cf8d88

====== Test Details ======

Test covers not all cases from attached file ('c5404.sql').
Waiting for reply on issue 22/Nov/16 06:10 PM

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 22, 2016

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Alpha 1 [ 10731 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 22, 2016

Commented by: @pavel-zotov

IMO, fix is incompleted.
Run script from attached file 'c5404.sql'.
You will see that messages like "-At line NN, column MM" appear only for first two SPs rather than for all of them.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 22, 2016

Modified by: @pavel-zotov

Attachment: c5404.sql [ 13035 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 22, 2016

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Waiting for reply on issue 22/Nov/16 06:10 PM

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 22, 2016

Commented by: @asfernandes

> You will see that messages like "-At line NN, column MM" appear only for first two SPs rather than for all of them.

That's not news for me. I fixed one kind of problem, the ones where errors is throwed in lexer/parser.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 22, 2016

Commented by: @pavel-zotov

So, how to properly implement test (.fbt) ? Exactly as it was shown by Hellen or one need to add there more examples related to compiler/parser ?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 23, 2016

Modified by: @pavel-zotov

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

QA Status: Deferred => Done with caveats

Test Details: Waiting for reply on issue 22/Nov/16 06:10 PM => Test covers not all cases from attached file ('c5404.sql').
Waiting for reply on issue 22/Nov/16 06:10 PM

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 11, 2018

Modified by: Sean Leyne (seanleyne)

Link: This issue is duplicated by CORE5873 [ CORE5873 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants