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

Use exception instead bugcheck for EVL_expr [CORE5563] #5830

Closed
firebird-automations opened this issue Jun 8, 2017 · 6 comments
Closed

Use exception instead bugcheck for EVL_expr [CORE5563] #5830

firebird-automations opened this issue Jun 8, 2017 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Maxim Kuzmin (cybermax)

For some querys, Firebird stopped with bugcheck for error at EVL_expr:
SERVER (Server) Tue Nov 08 14:00:41 2016
Database: --DATABASE--
internal Firebird consistency check (EVL_expr: invalid operation (232), file: evl.cpp line: 1219)

SERVER (Server) Tue Nov 08 14:00:41 2016
Database: --DATABASE--
internal Firebird consistency check (EVL_expr: invalid operation (232), file: evl.cpp line: 1219)

SERVER (Server) Tue Nov 08 14:05:29 2016
Database: --DATABASE--
internal Firebird consistency check (can't continue after bugcheck)

SERVER (Server) Tue Nov 08 14:05:29 2016
Database: --DATABASE--
internal Firebird consistency check (can't continue after bugcheck)

SERVER (Server) Tue Nov 08 14:05:29 2016
Database: --DATABASE--
internal Firebird consistency check (can't continue after bugcheck).

For this error, it is not necessary to stop the server with hundreds of users, sufficiently raising the exception at executing query.

Commits: c28e734

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

Ability to use nested aggregate looks strange (IMO).
Query like here can not be run in MS SQL or Postgress.
Sent letters to dimitr, 19.06.2018.

Also, see note 22/Jun/17 09:10 AM in this ticket.

@firebird-automations
Copy link
Collaborator Author

Commented by: Maxim Kuzmin (cybermax)

For example, this query stopping FB 2.5.6 with bugcheck:
SELECT
SUM(SUM((SELECT SUM(RF.RDB$FIELD_POSITION) FROM RDB$RELATION_FIELDS RF)))
FROM
RDB$DATABASE

@firebird-automations
Copy link
Collaborator Author

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

Commented by: @pavel-zotov

Check following sample:

set list on;

-- query from ticket:
select sum(sum((select sum(rf.rdb$field_position) from rdb$relation_fields rf))) as sf from rdb$database;
--select sign( sum( sum( ( select sum(rf.rdb$field_position) from rdb$relation_fields rf) ) ) ) as sf from rdb$database;

set echo on;

select sum( 1 ) as s01 from rdb$database rd;
select sum( rf.rdb$field_position ) as s01 from rdb$relation_fields rf;

----------------------------------------------------------------------

select sum( ( select sum( 1 ) from rdb$database rd ) ) as s02 from rdb$database;
select sum( ( select sum( rf.rdb$field_position ) from rdb$relation_fields rf) ) as s02 from rdb$database;

----------------------------------------------------------------------

select sum( sum( (select sum( 1 ) from rdb$database rd ) ) ) as s03 from rdb$database;
select sum( sum( (select sum( rf.rdb$field_position ) from rdb$relation_fields rf ) ) ) as s03 from rdb$database;

Last two statements will finish with this:

===
select sum( sum( (select sum( 1 ) from rdb$database rd ) ) ) as s03 from rdb$database;
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Nested aggregate and window functions are not allowed

select sum( sum( (select sum( rf.rdb$field_position ) from rdb$relation_fields rf ) ) ) as s03 from rdb$database;

S03 <null> -------------------------------- ???

Why we can see here "S03 <null>" (and it's what source query returns) ?

PS. WI-T4.0.0.680, WI-V3.0.3.32738

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: See note 22/Jun/17 09:10 AM

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred => Done with caveats

Test Details: See note 22/Jun/17 09:10 AM => Ability to use nested aggregate looks strange (IMO).
Query like here can not be run in MS SQL or Postgress.
Sent letters to dimitr, 19.06.2018.

Also, see note 22/Jun/17 09:10 AM in this ticket.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

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