Skip to content

Commit

Permalink
stop table ACL check for query without a table name.
Browse files Browse the repository at this point in the history
Vitess supports non table queries like "set flag=true"; therefore, table
ACL should be ignored for these queries.
  • Loading branch information
yaoshengzhe committed Sep 14, 2015
1 parent 66f3eed commit de21a72
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions go/vt/tabletserver/query_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ func (qre *QueryExecutor) checkPermissions() error {
qre.qe.tableaclExemptCount.Add(1)
return nil
}

// empty table name, do not need a table ACL check.
if qre.plan.TableName == "" {
return nil
}

if qre.plan.Authorized == nil {
return NewTabletError(ErrFail, vtrpc.ErrorCode_PERMISSION_DENIED, "table acl error: nil acl")
}
Expand Down

0 comments on commit de21a72

Please sign in to comment.