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-automations opened this issue Sep 4, 2013 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

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-automations
Copy link
Collaborator Author

Modified by: Peter Makmak (p.makmak)

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

@firebird-automations
Copy link
Collaborator Author

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-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Version: 2.5.2 [ 10450 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

Version: 2.5.3 [ 10461 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.3 [ 10461 ]

@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

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
Development

No branches or pull requests

2 participants