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
Bugcheck 232 (invalid operation) for an aggregated query [CORE1605] #2026
Comments
Modified by: @pcisarWorkflow: jira [ 13471 ] => Firebird [ 14077 ] |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Commented by: @dyemanov Adriano, hopefully you understand the DSQL internals better in order to fix that ;-) |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] => Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: leonon (leonon) Hello! Server WI-V6.3.2.26539 Firebird 2.5 Example: CREATE TABLE TEST1 ( ALTER TABLE TEST1 ADD CONSTRAINT PK_TEST1 PRIMARY KEY (ID); SET TERM ^ ; create or alter procedure S_TEST1 ( O_BALANCE = coalesce(O_BALANCE, 0); suspend; SET TERM ; ^ GRANT SELECT ON TEST1 TO PROCEDURE S_TEST1; Generating random test data (50,000 records) When run the query: select http://t.id, server is shut down with error: |
Commented by: @asfernandes This was fixed in some now unknown commit. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Commented by: @pavel-zotov > produces bugcheck 232 (invalid operation) instead of throwing a proper error Currently error "Cannot use an aggregate or window function in a GROUP BY clause" is produced in FB 3.0 only if expression does NOT contain aggregate of stored procedure result: Test-1:create table test01(x int); select count(*), sum( ( select rdb$format from rdb$formats f where f.rdb$relation_id = r.rdb$relation_id ) )
===================== ===================== select count(*), sum( ( select rdb$format from rdb$formats f where f.rdb$relation_id = r.rdb$relation_id ) ) Statement failed, SQLSTATE = 42000 Test-2:set term ^;
================ ===================== select count(*), sum( (select s from sp_sum(r.rdb$relation_id)) )
================ ===================== NO errors. Is it correct ? PS. ISQL Version: WI-T3.0.0.31785 Firebird 3.0 Beta 2 PPS. List of "Affects Version/s:" should be added with 2.5 because following messages appear on console:Statement failed, SQLSTATE = XX000
|
Commented by: @asfernandes Please test now. |
Commented by: @pavel-zotov > Please test now. It's OK now (LI-T3.0.0.31789): |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @dyemanov
Is related to QA536
Votes: 2
recreate table some_table (id int);
recreate procedure some_proc (id int)
returns (result int)
as
begin
result = 1;
suspend;
end;
insert into some_table values (1);
commit;
select
count(*),
sum( (select result from some_proc(id)) )
from
some_table
group by
2
-- produces bugcheck 232 (invalid operation) instead of throwing a proper error
Commits: 23c8c92 FirebirdSQL/fbt-repository@058dd20
The text was updated successfully, but these errors were encountered: