go-mysql-server
go-mysql-server copied to clipboard
superusers should be hidden
Currently, all users show up when running select * from mysql.user
, assuming you have select privileges on mysql.
One of these users is a superuser (can be specified through --user
, or defaults to root@localhost
) , that shows up but is never persisted. We should hide this superuser due to its special status.
Solution is probably to have a custom struct or something that implements sql.RowIter
in mysql_table.go
, and all it does is skip over any users that have member variable IsSuperUser
set.