Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sp_QuickieStore: @execution_type_desc is un-validated. #493

Closed
ReeceGoding opened this issue Oct 28, 2024 · 2 comments
Closed

sp_QuickieStore: @execution_type_desc is un-validated. #493

ReeceGoding opened this issue Oct 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working sp_QuickieStore For the loving of Query Store

Comments

@ReeceGoding
Copy link
Contributor

ReeceGoding commented Oct 28, 2024

Version of the script
All versions, I bet.

What is the current behavior?
You can type whatever you want in to @execution_type_desc and sp_QuickieStore will take it as a valid choice.

If the current behavior is a bug, please provide the steps to reproduce.
Run sp_QuickieStore @execution_type_desc = 'foobar'. The nonsense argument will get you no rows, but also no warnings or errors. This is unlike our other enum-like parameters, such as @sort_order.

What is the expected behavior?
Validate the input (the valid values are documented here), then, if the user inputs an invalid value, either throw an error and fail or print a message and use a sensible default instead. The choice is Erik's.

Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?
All versions, I bet.

IMPORTANT: If you're going to contribute code, please read the contributing guide first.
https://github.com/erikdarlingdata/DarlingData/blob/main/CONTRIBUTING.md
Again? Sure.

@erikdarlingdata erikdarlingdata added bug Something isn't working sp_QuickieStore For the loving of Query Store labels Oct 28, 2024
@erikdarlingdata
Copy link
Owner

@ReeceGoding good call on this. I totally missed it. This one should probably throw an error and re-print acceptable options.

@erikdarlingdata
Copy link
Owner

Closed via #494

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sp_QuickieStore For the loving of Query Store
Projects
None yet
Development

No branches or pull requests

2 participants