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

Error when compiling the procedure containing the statement if (x = (select ...)) [CORE4204] #4529

Closed
firebird-issue-importer opened this issue Sep 4, 2013 · 6 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Sep 4, 2013

Submitted by: Peter Makmak (p.makmak)

Is related to QA606

Error when compiling the procedure containing the statement if (x = (select ...))

for example:

create or alter procedure Test_C
as
declare variable X varchar(16);
begin

if (x = (select '123' from Rdb$Database)) then
begin
exit;
end
end

fails with a message
Column unknown. X

Of course, it can be worked around using the colon prefix: if (:x = (select ...)) but the following works without errors:

create or alter procedure Test_C
as
declare variable X varchar(16);
begin

if ((select '123' from Rdb$Database) = x) then
begin
exit;
end
end

Supposedly, the parser should be consistent here.

Commits: 0d5f4a5 FirebirdSQL/fbt-repository@d3c8051

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 4, 2013

Modified by: Peter Makmak (p.makmak)

priority: Major [ 3 ] => Minor [ 4 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 4, 2013

Modified by: @dyemanov

description: Error when compiling the procedure containing the statement if (x = (select ...))

for example:

compilation procedures

create or alter procedure Test_C
as
declare variable X varchar(16);
begin

if (x =(select '123' from Rdb$Database)) then
begin
exit;
end
end

fails with a message
Column unknown. X

=>

Error when compiling the procedure containing the statement if (x = (select ...))

for example:

create or alter procedure Test_C
as
declare variable X varchar(16);
begin

if (x = (select '123' from Rdb$Database)) then
begin
exit;
end
end

fails with a message
Column unknown. X

Of course, it can be worked around using the colon prefix: if (:x = (select ...)) but the following works without errors:

create or alter procedure Test_C
as
declare variable X varchar(16);
begin

if ((select '123' from Rdb$Database) = x) then
begin
exit;
end
end

Supposedly, the parser should be consistent here.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 10, 2013

Modified by: @asfernandes

Version: 2.5.2 [ 10450 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

Version: 2.5.3 [ 10461 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 10, 2013

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.3 [ 10461 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 29, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 25, 2015

Modified by: @pcisar

Link: This issue is related to QA606 [ QA606 ]

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