{"record":{"id":"249d35a1587b02d1","repo":"googleapis/mcp-toolbox","slug":"unable-to-execute-query-w-249d35","errorCode":null,"errorMessage":"unable to execute query: %w","messagePattern":"unable to execute query: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/mysql/mysql.go","lineNumber":135,"sourceCode":"\tif err := s.MySQLPool().QueryRowContext(ctx, \"SHOW VARIABLES LIKE 'performance_schema'\").Scan(&name, &value); err != nil {\n\t\treturn false, err\n\t}\n\treturn value == \"ON\", nil\n}\n\nfunc (s *Source) RetrieveSourceVersion(ctx context.Context) (string, error) {\n\tvar version string\n\tif err := s.MySQLPool().QueryRowContext(ctx, \"SELECT VERSION()\").Scan(&version); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn version, nil\n}\n\nfunc (s *Source) RunSQL(ctx context.Context, statement string, params []any) (any, error) {\n\tstatement = sqlcommenter.PrependComment(ctx, statement, SourceType, s.SQLCommenter)\n\tresults, err := s.MySQLPool().QueryContext(ctx, statement, params...)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to execute query: %w\", err)\n\t}\n\tdefer results.Close()\n\n\tcols, err := results.Columns()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to retrieve rows column name: %w\", err)\n\t}\n\n\t// create an array of values for each column, which can be re-used to scan each row\n\trawValues := make([]any, len(cols))\n\tvalues := make([]any, len(cols))\n\tfor i := range rawValues {\n\t\tvalues[i] = &rawValues[i]\n\t}\n\n\tcolTypes, err := results.ColumnTypes()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to get column types: %w\", err)","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/mysql/mysql.go#L117-L153","documentation":"Error \"unable to execute query: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/mysql/mysql.go:135 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}