Navigation Menu

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

The Large SQL crashes Firebird Server [CORE6536] #6763

Open
firebird-automations opened this issue Apr 9, 2021 · 6 comments
Open

The Large SQL crashes Firebird Server [CORE6536] #6763

firebird-automations opened this issue Apr 9, 2021 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Vadim Mescheryakov (vadimmescheryakov)

Attachments:
create-database-script.sql
Large Query.sql

The Large SQL with 10000 OR operators and the size above 137 kb crashes Firebird Server 3.0.1 and 3.0.7.33374_1.
The Firebird Server version 2.5 shows only this error
"Unsuccessful execution caused by an unavailable resource.
Implementation limit exceeded.
block size exceeds implementation restriction." and it stills working

@firebird-automations
Copy link
Collaborator Author

Commented by: Vadim Mescheryakov (vadimmescheryakov)

I attached two files for reproduction

@firebird-automations
Copy link
Collaborator Author

Modified by: Vadim Mescheryakov (vadimmescheryakov)

Attachment: create-database-script.sql [ 13580 ]

Attachment: Large Query.sql [ 13581 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Looks like a duplicate for CORE6223 and CORE395. Binary operations (+ - * / AND OR) are parsed and evaluated recursively and stack size is a limited resource, thus causing a crash (or stack overflow error sometimes) when a number of arguments becomes too big.

@firebird-automations
Copy link
Collaborator Author

Commented by: Vadim Mescheryakov (vadimmescheryakov)

FB 2.5 copes well with this SQL

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

AFAIU, it does not execute your query at all -- due to "block size exceeds implementation restriction" error.

@firebird-automations
Copy link
Collaborator Author

Commented by: Vadim Mescheryakov (vadimmescheryakov)

Yes. I meant "copes" in sense - Fb 2.5 doesn't crash, only returns error

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

1 participant