fix . Remove default limit from queries

pull/144/head v0.4.0.rc3
John Shahid 2013-12-11 14:22:07 -05:00
parent 136281ccd7
commit ba6cf0fca0
3 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -22,10 +22,6 @@ type Operation int
type ValueType int
const (
DEFAULT_LIMIT = 10000
)
const (
ValueRegex ValueType = C.VALUE_REGEX
ValueInt = C.VALUE_INT
@ -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)

View File

@ -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)