Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@thiagoftsm
Copy link
Contributor

@thiagoftsm thiagoftsm commented Dec 6, 2025

Summary

Some queries can return NULL values (mainly in replication scenarios). To prevent potential issues, this PR ensures values are set whenever the final query delivers a NULL.

Test Plan
  1. Compile Branch.
  2. Install on a host running MSSQL and verify everything is running as expected.
Additional Information
For users: How does this change affect me?

Summary by cubic

Handle MSSQL NULL results across the Windows plugin collectors by defaulting numeric fields to 0 and strings to empty, preventing bad metrics and errors, especially in replication and status queries.

  • Bug Fixes
    • Set safe defaults when SQL_NULL_DATA is returned in transactions, locks, waits, replication, job status, user connections, DB list, and permission/status queries.
    • Updated fill_long_value to treat NULL sizes as 0.
    • Used separate length variables to correctly detect NULLs for DB state and readonly flags.

Written for commit 09545b3. Summary will update automatically on new commits.

@github-actions github-actions bot added area/collectors Everything related to data collection collectors/windows labels Dec 6, 2025
@thiagoftsm thiagoftsm marked this pull request as ready for review December 6, 2025 02:28
@thiagoftsm thiagoftsm requested a review from stelfrag December 6, 2025 02:28
@thiagoftsm thiagoftsm marked this pull request as draft December 6, 2025 02:33
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

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

Labels

area/collectors Everything related to data collection collectors/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.