SQL Server 2019 CTP 3.1 function error
Call a function like this:
SET @varFirstPolicyID = dbo.fIPDGetFirstPolicyID(@pPolicyID, DEFAULT, DEFAULT)
causes SQL Server to throw the following exception:
Msg 596, Level 21, State 1, Line 0
Cannot continue the execution because the session is in the kill state.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
This has been tested in both 2016 and 2017 and works ok.