code: func getTablePriv(ctx sessionctx.Context, name string, host string, db string, tbl string) (string, string, error) {
  	sql := fmt.Sprintf(`SELECT Table_priv, Column_priv FROM %s.%s WHERE User='%s' AND Host='%s' AND DB='%s' AND Table_name='%s';`, mysql.SystemDB, mysql.TablePrivTable, name, host, db, tbl)
  	rows, fields, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql)
  	if err != nil {
  		return "", "", err
  	}
  	if len(rows) < 1 {
  		return "", "", errors.Errorf("get table privilege fail for %s %s %s %s", name, host, db, tbl)
  	}
  	var tPriv, cPriv string
  	row := rows[0]
  	if fields[0].Column.Tp == mysql.TypeSet {
  		tablePriv := row.GetSet(0)
  		tPriv = tablePriv.Name
  	}
  	if fields[1].Column.Tp == mysql.TypeSet {
  		columnPriv := row.GetSet(1)
  		cPriv = columnPriv.Name
  	}
  	return tPriv, cPriv, nil
  }
docs: // getTablePriv gets current table scope privilege set from mysql.Tables_priv.
  // Return Table_priv and Column_priv.