AzureSQL icon indicating copy to clipboard operation
AzureSQL copied to clipboard

AzureSQLMaintenance script doesn't default mode when explicitly passed NULL

Open asos-richardevans opened this issue 5 months ago • 0 comments

When explicitly passing the @mode parameter as NULL to the AzureSQLMaintenance stored procedure the protection that sets the mode to 'smart' as a default doesn't get executed.

Proposing that the code on line 63 is changed from

if @mode not in ('smart','dummy') set @mode = 'smart'

to

if (@mode not in ('smart','dummy') OR @mode IS NULL) set @mode = 'smart'

asos-richardevans avatar Sep 16 '24 13:09 asos-richardevans