fix #386. Drop series should work with names containing dots

pull/341/head
John Shahid 2014-04-01 09:32:46 -04:00
parent 767ba83252
commit ca28d1d1e9
3 changed files with 9 additions and 7 deletions

View File

@ -342,3 +342,5 @@
## v0.5.4 [unreleased]
### Bugfixes
- [Issue #386](https://github.com/influxdb/influxdb/issues/386). Drop series should work with series containing dots

View File

@ -964,7 +964,7 @@ func (self *ServerSuite) TestDropSeries(c *C) {
self.serverProcesses[0].Post("/db?u=root&p=root", `{"name": "drop_series", "replicationFactor": 3}`, c)
self.serverProcesses[0].Post("/db/drop_series/users?u=root&p=root", `{"name": "paul", "password": "pass"}`, c)
data := `[{
"name": "cluster_query",
"name": "cluster_query.1",
"columns": ["val1"],
"points": [[1]]
}]`
@ -972,19 +972,19 @@ func (self *ServerSuite) TestDropSeries(c *C) {
time.Sleep(time.Second)
for _, s := range self.serverProcesses {
fmt.Printf("Running query against: %d\n", s.apiPort)
collection := s.Query("drop_series", "select * from cluster_query", true, c)
collection := s.Query("drop_series", "select * from cluster_query.1", true, c)
c.Assert(collection.Members, HasLen, 1)
series := collection.GetSeries("cluster_query", c)
series := collection.GetSeries("cluster_query.1", c)
c.Assert(series.SerializedSeries.Points, HasLen, 1)
}
switch i {
case 0:
fmt.Printf("Using the http api\n")
resp := self.serverProcesses[0].Delete("/db/drop_series/series/cluster_query?u=root&p=root", "", c)
resp := self.serverProcesses[0].Delete("/db/drop_series/series/cluster_query.1?u=root&p=root", "", c)
c.Assert(resp.StatusCode, Equals, http.StatusNoContent)
case 1:
fmt.Printf("Using the drop series\n")
self.serverProcesses[0].Query("drop_series", "drop series cluster_query", false, c)
self.serverProcesses[0].Query("drop_series", "drop series cluster_query.1", false, c)
case 2:
resp := self.serverProcesses[0].Delete("/db/drop_series?u=root&p=root", "", c)
c.Assert(resp.StatusCode, Equals, http.StatusNoContent)
@ -993,7 +993,7 @@ func (self *ServerSuite) TestDropSeries(c *C) {
time.Sleep(time.Second)
for _, s := range self.serverProcesses {
fmt.Printf("Running query against: %d\n", s.apiPort)
collection := s.Query("drop_series", "select * from cluster_query", true, c)
collection := s.Query("drop_series", "select * from cluster_query.1", true, c)
c.Assert(collection.Members, HasLen, 0)
}
}

View File

@ -201,7 +201,7 @@ DELETE_QUERY:
}
DROP_SERIES_QUERY:
DROP_SERIES SIMPLE_NAME_VALUE
DROP_SERIES SIMPLE_TABLE_VALUE
{
$$ = malloc(sizeof(drop_series_query));
$$->name = $2;