sql: detection of single-statement implicit transactions broken in batch #78970
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Describe the problem
In #76834 we changed the behavior of how a batch of statements are
executed when sent in a single protocol message. A number of features in cockroach use the
TxnImplicit
field of theEvalContext
to decide whether the statement being executed is a single-statement explicit transaction. Below is a non-exhaustive list:ALTER COLUMN TYPE
ALTER TABLE DROP COLUMN
CREATE TABLE AS SELECT
REFRESH MATERIALIZED VIEW
SET CLUSTER SETTING
SET LOCAL
DECLARE CURSOR
crdb_internal.gc_tenant
This might be as simple as moving everything to use the
AutoCommit
concept instead of theImplicit
concept. I'm not sure. I thinkAutoCommit
might permit these things to happen as the last statement in a multi-statement "implicit" transaction. That worries me.Jira issue: CRDB-14467
The text was updated successfully, but these errors were encountered: