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

return error on delete statement, closes #1933 #1952

Merged
merged 1 commit into from
Mar 15, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,8 @@ func (s *Server) ExecuteQuery(q *influxql.Query, database string, user *User) Re
res = s.executeShowServersStatement(stmt, user)
case *influxql.CreateUserStatement:
res = s.executeCreateUserStatement(stmt, user)
case *influxql.DeleteStatement:
res = s.executeDeleteStatement()
case *influxql.DropUserStatement:
res = s.executeDropUserStatement(stmt, user)
case *influxql.ShowUsersStatement:
Expand Down Expand Up @@ -2637,6 +2639,10 @@ func (s *Server) executeAlterRetentionPolicyStatement(stmt *influxql.AlterRetent
return &Result{Err: err}
}

func (s *Server) executeDeleteStatement() *Result {
return &Result{Err: ErrInvalidQuery}
}

func (s *Server) executeDropRetentionPolicyStatement(q *influxql.DropRetentionPolicyStatement, user *User) *Result {
return &Result{Err: s.DeleteRetentionPolicy(q.Database, q.Name)}
}
Expand Down