DarlingData
DarlingData copied to clipboard
sp_QuickieStore: @execution_type_desc is un-validated.
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.