Consider the following scenario:
- You try to run a query by using default Cardinality Estimation while histogram amendment is enabled.
- The query includes expressions on a column that is used in one of the predicates.
In this scenario, an access violation occurs. Additionally, you receive the following error message:
Msg 596, Level 21, State 1, Line LineNumber
Cannot continue the execution because the session is in the kill state.
Msg 0, Level 20, State 0, Line LineNumber
A severe error occurred on the current command. The results, if any, should be discarded.
Note Histogram amendment can be enabled by using the USE HINT(‘ENABLE_HIST_AMENDMENT_FOR_ASC_KEYS’) query option or trace flag 4139.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.