influxdata / influxdata/influxdb
Incorrect data returned by select
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
System info: InfluxDB 1.7.1, CentOS 6.6
Steps to reproduce:
Start influx CLI:
influx -database collectd
Run query:
SELECT SUM(inserts) FROM (SELECT MAX(value) - MIN(value) AS inserts FROM mysql WHERE ("instance" = "mysql" AND "type" = 'mysql_commands' AND "type_instance" = 'insert') AND time > now() - 3D GROUP BY host)
Expected behavior: Consistent, moving total.
Actual behavior: Inconsistent results returned.
Run results:
728499882
728499882
728549180
728607619
7583
373502535
If I run the query from the command line then the output is:
728636080
1073708196
...
2034285
If I remove the SELET SUM() part of the query then the individual lines always look correct and the time is the same for all.
I cannot get inconsistent output from the subquery, all of the individual lines in the output are correct.
Contributor guide
Research direction
Start by reproducing the nested SUM query in the influx CLI against InfluxDB 1.7.1, repeating it and comparing the results with the subquery alone. The issue mentions no source files or tests; done means repeated executions return a consistent total while the individual subquery rows remain correct.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100