Many Times!
These table valued functions of the built-in variety have this problem.
This one is no exception. Well, it does throw an exception. But you know.
That’s not exceptional.
DROP TABLE IF EXISTS
dbo.select_into;
BEGIN TRAN
SELECT
id =
gs.value
INTO dbo.select_into
FROM GENERATE_SERIES
(
START = 1,
STOP = 10000000
) AS gs
OPTION(MAXDOP 8);
COMMIT;
If you run the above code, you’ll get this error:
Msg 1205, Level 13, State 78, Line 105 Transaction (Process ID 70) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Like the issues I outlined in yesterday’s post, I do hope these get fixed before go-live.
Thanks for reading!
More From This Series
Going Further
For youWork With Your Databases the Way I DoVideo course, $250 until December 1, then $500For your teamAI for Database Teams WorkshopOne day, on-site or remote
Someone still has to know enough SQL Server to keep the robots in check, and that’s what my training is for.
I haven’t read your other post on this function…but I found it fun how SLOW this new function is. It’s an absolute pig.
9/10 stars, not enough “boy oh boy”!