googleapis/mcp-toolbox · error
unable to execute query: %w
Error message
unable to execute query: %w
What it means
Error "unable to execute query: %w" thrown in googleapis/mcp-toolbox.
Source
Thrown at internal/sources/mysql/mysql.go:135
if err := s.MySQLPool().QueryRowContext(ctx, "SHOW VARIABLES LIKE 'performance_schema'").Scan(&name, &value); err != nil {
return false, err
}
return value == "ON", nil
}
func (s *Source) RetrieveSourceVersion(ctx context.Context) (string, error) {
var version string
if err := s.MySQLPool().QueryRowContext(ctx, "SELECT VERSION()").Scan(&version); err != nil {
return "", err
}
return version, nil
}
func (s *Source) RunSQL(ctx context.Context, statement string, params []any) (any, error) {
statement = sqlcommenter.PrependComment(ctx, statement, SourceType, s.SQLCommenter)
results, err := s.MySQLPool().QueryContext(ctx, statement, params...)
if err != nil {
return nil, fmt.Errorf("unable to execute query: %w", err)
}
defer results.Close()
cols, err := results.Columns()
if err != nil {
return nil, fmt.Errorf("unable to retrieve rows column name: %w", err)
}
// create an array of values for each column, which can be re-used to scan each row
rawValues := make([]any, len(cols))
values := make([]any, len(cols))
for i := range rawValues {
values[i] = &rawValues[i]
}
colTypes, err := results.ColumnTypes()
if err != nil {
return nil, fmt.Errorf("unable to get column types: %w", err)View on GitHub (pinned to 8cc6e09de2)
When it happens
Trigger: Thrown at internal/sources/mysql/mysql.go:135 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/249d35a1587b02d1.
Report an issue: GitHub.