Skip to content

Conversation

@jycor
Copy link
Contributor

@jycor jycor commented Oct 11, 2024

This PR cleans up the logic surrounding warnings and clearing them.
The important part was separating the number of "new" warnings from the list of warnings themselves.

Every query should clear out the warnings from the previous query. The exception is show warnings, which only clears the "count" of warnings.

When a server runs a query that produces a warning, it immediately calls show warnings. Since the show warnings query itself should NOT clear the warnings, the warning count would always be > 0, and incorrectly indicate that show warnings produced a warning. This causes an infinite loop in .NET. Now, we always clear the warning count, and only clear the warnings themselves when the query is not show warnings.

We've also had this weird problem of having to double clear warnings, which this should address.

fixes:

@jycor jycor changed the title clear warnings better, and separate warning count from actual warnings clear warnings better and separate warning count from actual warnings Oct 11, 2024
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM

@jycor jycor merged commit 9ee86c8 into main Oct 11, 2024
8 checks passed
@jycor jycor deleted the james/warnings branch October 11, 2024 21:58
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.

3 participants