fix(database_observability.mysql): Make query sample text nullable in MySQL query details collector#5425
Merged
fridgepoet merged 1 commit intomainfrom Feb 4, 2026
Conversation
|
Cursor Agent can help with this pull request. Just |
matthewnolf
approved these changes
Feb 4, 2026
cb1d9fb to
42cbd04
Compare
cristiangreco
approved these changes
Feb 4, 2026
Draft
3 tasks
cristiangreco
pushed a commit
that referenced
this pull request
Feb 12, 2026
… MySQL query details collector [backport] (#5519) ## Backport of #5425 This PR backports #5425 to release/v1.13. ### Original PR Author @fridgepoet ### Description This PR handles NULL `query_sample_text` in the MySQL query details collector. This PR addresses a `sql: Scan error on column index 3, name "query_sample_text": converting NULL to string is unsupported` when scanning results from the `summary table samples`. The `query_sample_text` column in `internal/component/database_observability/mysql/collector/query_details.go` has been updated from a `string` to `sql.NullString` to correctly handle NULL values from the database. ### PR Checklist - [ ] Documentation added - [x] Tests updated - [ ] Config converters updated <a href="https://cursor.com/background-agent?bcId=bc-a95f4c5e-11ef-530f-a7b3-448bd2ef0888"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> <a href="https://cursor.com/agents?id=bc-a95f4c5e-11ef-530f-a7b3-448bd2ef0888"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> --- *This backport was created automatically.* Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR handles NULL
query_sample_textin the MySQL query details collector.This PR addresses a
sql: Scan error on column index 3, name "query_sample_text": converting NULL to string is unsupportedwhen scanning results from thesummary table samples.The
query_sample_textcolumn ininternal/component/database_observability/mysql/collector/query_details.gohas been updated from astringtosql.NullStringto correctly handle NULL values from the database.PR Checklist