Opened 10 years ago

Closed 5 years ago

#888 closed defect (duplicate)

Overflow in parsing mintervals

Reported by: Dimitar Misev Owned by: Dimitar Misev
Priority: major Milestone: 10.0
Component: qlparser Version: development
Keywords: Cc: Peter Baumann, George Merticariu
Complexity: Medium

Description (last modified by Dimitar Misev)

"SELECT count_cells(colD1S10Gb[0:536870911] >= 0) + count_cells(colD1S10Gb[1700091222:2236962133] >= 0) FROM colD1S10Gb"
----------------------------------------
rasdaman error 389: Execution error 389 in line 1, column 85, near token :: No interval (in case of fixed bounds, the upper one can not be smaller than the lower one).

2236962133 is bigger than 2^31 (2147483648), probably an int is used somewhere in the parser and the upper bound overflows in this case.

Attachments (2)

0001-ticket-888-make-interval-long-long.patch (2.6 KB ) - added by Dimitar Misev 10 years ago.
ticket_888.tar.gz (1.7 KB ) - added by Dimitar Misev 9 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by Dimitar Misev, 10 years ago

Description: modified (diff)

comment:2 by Dimitar Misev, 10 years ago

The type sizes are a bit outdated and need a major review and update for rasdaman 10 I'd say.

comment:3 by Dimitar Misev, 10 years ago

Patch attached, should be checked if it's backwards compatible.

comment:4 by Dimitar Misev, 9 years ago

Milestone: 9.110.0

comment:5 by Peter Baumann, 9 years ago

Priority: majorcritical

comment:6 by Peter Baumann, 9 years ago

Milestone: 10.09.2

by Dimitar Misev, 9 years ago

Attachment: ticket_888.tar.gz added

comment:7 by Dimitar Misev, 9 years ago

Here's an updated patch and a script to test it attachment:ticket_888.tar.gz

comment:8 by Dimitar Misev, 9 years ago

Note that this patch needs further work and careful evaluation. For example, with the patch:

$ rasql -q 'select avg_cells(c) from mr as c' --out string
Query result collection has 1 element(s):
  Result element 1: 2.60476e+09
rasql done.

Proper output expected:

$ rasql -q 'select avg_cells(c) from mr as c' --out string
Query result collection has 1 element(s):
  Result element 1: 39.8363
rasql done.

comment:9 by Dimitar Misev, 8 years ago

Milestone: 9.210.0

comment:10 by Vlad Merticariu, 5 years ago

Owner: changed from Dimitar Misev to apercov
Status: newassigned

comment:11 by Vlad Merticariu, 5 years ago

Priority: criticalmajor

comment:12 by apercov, 5 years ago

Status: assignedaccepted

What exactly is expected result of the query presented in the description. I took a look, and the problem is not caused by integer type. This is received warning:

[DEBUG] - 2019-08-06 20:14:36,543, raslib/sinterval.cc:758: Cannot calculate intersection of intervals 0:536870911 and 7654604800:7654604804.
specified domain [0:536870911] does not intersect with the MDD spatial domain [7654604800:7654604804], returning empty result. 
Version 0, edited 5 years ago by apercov (next)

comment:13 by Dimitar Misev, 5 years ago

Owner: changed from apercov to Dimitar Misev
Status: acceptedassigned

comment:14 by Dimitar Misev, 5 years ago

Resolution: duplicate
Status: assignedclosed

This ticket is a duplicate of #1935, it cannot be fixed without type support for 64-bit integers.

Note: See TracTickets for help on using tickets.