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

Division by zero in inner join crashes InfluxDB #1022

Closed
baryonix opened this issue Oct 11, 2014 · 1 comment
Closed

Division by zero in inner join crashes InfluxDB #1022

baryonix opened this issue Oct 11, 2014 · 1 comment
Assignees

Comments

@baryonix
Copy link

This is on InfluxDB 0.8.3, 64-bit RPM on Fedora 20.

I have two series, "test1" and "test2":

select * from test1

[
    {
        "name": "test1",
        "columns": [
            "time",
            "sequence_number",
            "value"
        ],
        "points": [
            [
                1413023086000,
                50001,
                0
            ],
            [
                1413023014000,
                30001,
                0
            ]
        ]
    }
]

select * from test2

[
    {
        "name": "test2",
        "columns": [
            "time",
            "sequence_number",
            "value"
        ],
        "points": [
            [
                1413023086000,
                60001,
                0
            ],
            [
                1413023014000,
                40001,
                0
            ]
        ]
    }
]

Now I run the following query:

select a.value / b.value from test1 as a inner join test2 as b

This crashes InfluxDB with this log output. Note the crash occurs only with two or more points in the series. With a single point, a runtime error is logged, but InfluxDB returns an empty result set and continues to run.

@jvshahid jvshahid self-assigned this Oct 14, 2014
@jvshahid jvshahid removed their assignment Oct 14, 2014
dgnorton added a commit that referenced this issue Oct 23, 2014
@dgnorton
Copy link
Contributor

Script to reproduce...

create db issue1022
\db issue1022
bind

insert into test1 values (1413023086000,50001,0)
insert into test1 values (1413023014000,30001,0)
insert into test1 values (1413023013000,20001,2)

insert into test2 values (1413023086000,60001,0)
insert into test2 values (1413023014000,40001,0)
insert into test2 values (1413023013000,20001,1)

select a.value / b.value from test1 as a inner join test2 as b

delete db issue1022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants