Commit 361c384
Get-DbaDbMailHistory - Make the Status filter work on case sensitive instances
The sysmail_allitems view emits sent_status in lowercase (unsent, sent,
failed, retrying), but the documented -Status values are capitalized and
went into the WHERE clause verbatim - on a case sensitive instance
-Status Sent matched nothing. The filter now lowercases both sides.
The test fixture also inserted importance and sensitivity as "Normal",
which violates msdb''s CHECK constraints on a case sensitive instance
(they compare against uppercase NORMAL/HIGH/LOW); the fixture now
inserts the uppercase values the constraints expect.
Verified 11/11 green on SQL05\SQL2025 (case sensitive) and
SQL03\SQL2019 (case insensitive).
(do Get-DbaDbMailHistory)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 0473789 commit 361c384
2 files changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments