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

*: Add SHOW PLACEMENT support for DB #28366

Merged
merged 7 commits into from
Sep 27, 2021
Merged
Prev Previous commit
Next Next commit
do some modify
  • Loading branch information
lcwangchao committed Sep 26, 2021
commit de23326661407080186cf132bc13efde8a9d99cf
2 changes: 1 addition & 1 deletion executor/show_placement.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (e *ShowExec) fetchAllDBPlacements() error {
sort.Slice(dbs, func(i, j int) bool { return dbs[i].Name.O < dbs[j].Name.O })

for _, dbInfo := range dbs {
if e.ctx.GetSessionVars().User != nil && !checker.DBIsVisible(activeRoles, dbInfo.Name.O) {
if e.ctx.GetSessionVars().User != nil && checker != nil && !checker.DBIsVisible(activeRoles, dbInfo.Name.O) {
continue
}

Expand Down