diff --git a/pkg/bench/rttanalysis/testdata/benchmark_expectations b/pkg/bench/rttanalysis/testdata/benchmark_expectations index 970ae2872ae3..6003619e51af 100644 --- a/pkg/bench/rttanalysis/testdata/benchmark_expectations +++ b/pkg/bench/rttanalysis/testdata/benchmark_expectations @@ -31,9 +31,9 @@ exp,benchmark 15,CreateRole/create_role_with_2_options 18,CreateRole/create_role_with_3_options 13,CreateRole/create_role_with_no_options -18,"Discard/DISCARD_ALL,_1_tables_in_1_db" -21,"Discard/DISCARD_ALL,_2_tables_in_2_dbs" -1,"Discard/DISCARD_ALL,_no_tables" +12,"Discard/DISCARD_ALL,_1_tables_in_1_db" +15,"Discard/DISCARD_ALL,_2_tables_in_2_dbs" +0,"Discard/DISCARD_ALL,_no_tables" 10,DropDatabase/drop_database_0_tables 11,DropDatabase/drop_database_1_table 11,DropDatabase/drop_database_2_tables diff --git a/pkg/sql/user.go b/pkg/sql/user.go index 0ff58cbe52ea..8a077c21e3a6 100644 --- a/pkg/sql/user.go +++ b/pkg/sql/user.go @@ -546,7 +546,7 @@ func (p *planner) setRole(ctx context.Context, local bool, s username.SQLUsernam sessionUser := p.SessionData().SessionUser() becomeUser := sessionUser // Check the role exists - if so, populate becomeUser. - if !s.IsNoneRole() { + if !s.IsNoneRole() && s != sessionUser { becomeUser = s exists, err := p.RoleExists(ctx, becomeUser)