Skip to content

Conversation

@idoqo
Copy link
Contributor

@idoqo idoqo commented Oct 30, 2025

PMM-14321

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bounds checking bug in the query fingerprinting logic that could cause an index out of bounds error when processing certain SQL queries. The fix adds a length check before accessing q[qi+1] to prevent potential panics.

  • Added bounds checking to prevent index out of range errors
  • Added test coverage for system variable queries that trigger the edge case

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
query/query.go Added bounds check (qi+1 < len(q)) before accessing q[qi+1] to prevent index out of bounds errors
query/query_test.go Added test case for system variable queries to verify the bug fix works correctly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants