Why not interrupting current command on statement close #2039
-
Hi guys, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Canceling (interrupting) a command sends a signal to the server to stop processing the current execution. Current close behavior allows server-side processing to complete (by waiting and consuming all results) before closing the connection. If we changed to cancel on close, (1) the behavior would change and (2) the behavior would be inconsistent/indeterminate server-side results of any in-process executions. (There could be any number of T-SQL commands/stored procedures/inserts/updates running in a single execution and the cancel could happen anywhere inside/during that execution.) Regards, |
Beta Was this translation helpful? Give feedback.
Canceling (interrupting) a command sends a signal to the server to stop processing the current execution. Current close behavior allows server-side processing to complete (by waiting and consuming all results) before closing the connection. If we changed to cancel on close, (1) the behavior would change and (2) the behavior would be inconsistent/indeterminate server-side results of any in-process executions. (There could be any number of T-SQL commands/stored procedures/inserts/updates running in a single execution and the cancel could happen anywhere inside/during that execution.)
Regards,
David