Skip to content

Commit

Permalink
fix #61. Remove default limit from queries
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshahid committed Dec 11, 2013
1 parent 136281c commit ba6cf0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
- [Issue #89](https://github.com/influxdb/influxdb/issues/89). 'Group by' combined with 'where' not working
- [Issue #106](https://github.com/influxdb/influxdb/issues/106). Don't panic if we only see one point and can't calculate derivative
- [Issue #105](https://github.com/influxdb/influxdb/issues/105). Panic when using a where clause that reference columns with null values
- [Issue #61](https://github.com/influxdb/influxdb/issues/61). Remove default limits from queries

### Deprecated

Expand Down
7 changes: 2 additions & 5 deletions src/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ type Operation int

type ValueType int

const (
DEFAULT_LIMIT = 10000
)

const (
ValueRegex ValueType = C.VALUE_REGEX
ValueInt = C.VALUE_INT
Expand Down Expand Up @@ -456,7 +452,8 @@ func parseSelectDeleteCommonQuery(queryString string, fromClause *C.from_clause,
func parseSelectQuery(queryString string, q *C.select_query) (*SelectQuery, error) {
limit := q.limit
if limit == -1 {
limit = DEFAULT_LIMIT
// no limit by default
limit = 0
}

basicQurey, err := parseSelectDeleteCommonQuery(queryString, q.from_clause, q.where_condition)
Expand Down
2 changes: 1 addition & 1 deletion src/parser/query_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (self *QueryApiSuite) TestDefaultLimit(c *C) {
for queryStr, limit := range map[string]int{
"select * from t limit 0": 0,
"select * from t limit 1000": 1000,
"select * from t;": 10000,
"select * from t;": 0,
} {
query, err := ParseSelectQuery(queryStr)
c.Assert(err, IsNil)
Expand Down

0 comments on commit ba6cf0f

Please sign in to comment.