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

Large LIMIT in SELECT may abort the query #3857

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Large LIMIT in SELECT may abort the query #3857

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2015-11-10 18:12:13 +0100
From: Kevin Boulain <<kevin.boulain>>
To: SQL devs <>
Version: 11.21.5 (Jul2015)
CC: @njnes

Last updated: 2016-01-15 11:37:52 +0100

Comment 21499

Date: 2015-11-10 18:12:13 +0100
From: Kevin Boulain <<kevin.boulain>>

User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0
Build Identifier:

Using an unusual large LIMIT on a SELECT may abort the query.

Reproducible: Always

Steps to Reproduce:

On the mclient:

  1. sql>create table test (x int);
  2. sql>select * from test limit 1000000000000000000000000000000000000000;

Actual Results:

GDK reported error.
CMDslice: argument out of range

Expected Results:

+---+
| x |
+===+
+---+
0 tuples (1.693ms)

Note that the select should be done on a table (even empty as shown above), this simpler query won't trigger the problem since the LIMIT seems to be optimised out:
sql>select 1 limit 1000000000000000000000000000000000000000;
+--------------+
| single_value |
+==============+
| 1 |
+--------------+
1 tuple (0.329ms)

Comment 21513

Date: 2015-11-11 11:08:25 +0100
From: @njnes

integer value parsing should have failed, ie the query should fail with a clear sql error not an mal level one.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants