From b8550cf87ddb4f6ea949a48a7f06afbc1646d54c Mon Sep 17 00:00:00 2001 From: Michael Erickson Date: Fri, 8 Apr 2022 10:21:30 -0700 Subject: [PATCH] sql: session variable to allow multiple modification subqueries of table Add a new session variable, enable_multiple_modifications_of_table, which can be used instead of sql.multiple_modifications_of_table.enabled to allow execution of statements with multiple modification subqueries of the same table. Instead of making the original cluster setting the GlobalDefault of this new session setting, the original cluster setting is kept in the optbuilder logic. This is to avoid breaking applications that are already toggling the cluster setting mid-session to allow statements. Fixes: #76261 Release note (sql change): Add a new session variable, enable_multiple_modifications_of_table, which can be used instead of cluster variable sql.multiple_modifications_of_table.enabled to allow statements containing multiple INSERT ON CONFLICT, UPSERT, UPDATE, or DELETE subqueries modifying the same table. Note that underlying issue 70731 is not fixed. As with sql.multiple_modifications_of_table.enabled, be warned that with this session variable enabled there is nothing to prevent the table corruption seen in issue 70731 from occuring if the same row is modified multiple times by different subqueries of a single statment. It's best to rewrite these statements, but the session variable is provided as an aid if this is not possible. Release justification: low risk, high benefit change to existing functionality. --- pkg/sql/exec_util.go | 4 + .../testdata/logic_test/information_schema | 1 + .../logictest/testdata/logic_test/pg_catalog | 3 + .../logictest/testdata/logic_test/show_source | 1 + pkg/sql/logictest/testdata/logic_test/with | 25 ++ pkg/sql/opt/optbuilder/util.go | 5 +- .../local_only_session_data.pb.go | 279 ++++++++++-------- .../local_only_session_data.proto | 4 + pkg/sql/vars.go | 18 ++ 9 files changed, 220 insertions(+), 120 deletions(-) diff --git a/pkg/sql/exec_util.go b/pkg/sql/exec_util.go index 3af2fb84ff61..49e2fad8a417 100644 --- a/pkg/sql/exec_util.go +++ b/pkg/sql/exec_util.go @@ -2976,6 +2976,10 @@ func (m *sessionDataMutator) SetLargeFullScanRows(val float64) { m.data.LargeFullScanRows = val } +func (m *sessionDataMutator) SetMultipleModificationsOfTable(val bool) { + m.data.MultipleModificationsOfTable = val +} + // Utility functions related to scrubbing sensitive information on SQL Stats. // quantizeCounts ensures that the Count field in the diff --git a/pkg/sql/logictest/testdata/logic_test/information_schema b/pkg/sql/logictest/testdata/logic_test/information_schema index 37cbd06516ac..e5242711ee2b 100644 --- a/pkg/sql/logictest/testdata/logic_test/information_schema +++ b/pkg/sql/logictest/testdata/logic_test/information_schema @@ -4618,6 +4618,7 @@ enable_experimental_alter_column_type_general off enable_experimental_stream_replication off enable_implicit_select_for_update on enable_insert_fast_path on +enable_multiple_modifications_of_table off enable_multiregion_placement_policy off enable_seqscan on enable_zigzag_join on diff --git a/pkg/sql/logictest/testdata/logic_test/pg_catalog b/pkg/sql/logictest/testdata/logic_test/pg_catalog index bb07dbcb9a29..8d64eea11a7e 100644 --- a/pkg/sql/logictest/testdata/logic_test/pg_catalog +++ b/pkg/sql/logictest/testdata/logic_test/pg_catalog @@ -4025,6 +4025,7 @@ enable_experimental_alter_column_type_general off NULL enable_experimental_stream_replication off NULL NULL NULL string enable_implicit_select_for_update on NULL NULL NULL string enable_insert_fast_path on NULL NULL NULL string +enable_multiple_modifications_of_table off NULL NULL NULL string enable_multiregion_placement_policy off NULL NULL NULL string enable_seqscan on NULL NULL NULL string enable_zigzag_join on NULL NULL NULL string @@ -4127,6 +4128,7 @@ enable_experimental_alter_column_type_general off NULL enable_experimental_stream_replication off NULL user NULL off off enable_implicit_select_for_update on NULL user NULL on on enable_insert_fast_path on NULL user NULL on on +enable_multiple_modifications_of_table off NULL user NULL off off enable_multiregion_placement_policy off NULL user NULL off off enable_seqscan on NULL user NULL on on enable_zigzag_join on NULL user NULL on on @@ -4225,6 +4227,7 @@ enable_experimental_alter_column_type_general NULL NULL NULL enable_experimental_stream_replication NULL NULL NULL NULL NULL enable_implicit_select_for_update NULL NULL NULL NULL NULL enable_insert_fast_path NULL NULL NULL NULL NULL +enable_multiple_modifications_of_table NULL NULL NULL NULL NULL enable_multiregion_placement_policy NULL NULL NULL NULL NULL enable_seqscan NULL NULL NULL NULL NULL enable_zigzag_join NULL NULL NULL NULL NULL diff --git a/pkg/sql/logictest/testdata/logic_test/show_source b/pkg/sql/logictest/testdata/logic_test/show_source index 68e476e69afc..7cdcb903e0fa 100644 --- a/pkg/sql/logictest/testdata/logic_test/show_source +++ b/pkg/sql/logictest/testdata/logic_test/show_source @@ -50,6 +50,7 @@ enable_experimental_alter_column_type_general off enable_experimental_stream_replication off enable_implicit_select_for_update on enable_insert_fast_path on +enable_multiple_modifications_of_table off enable_multiregion_placement_policy off enable_seqscan on enable_zigzag_join on diff --git a/pkg/sql/logictest/testdata/logic_test/with b/pkg/sql/logictest/testdata/logic_test/with index 2e79da24887a..5e1cd97a9d75 100644 --- a/pkg/sql/logictest/testdata/logic_test/with +++ b/pkg/sql/logictest/testdata/logic_test/with @@ -926,6 +926,31 @@ EXPERIMENTAL SCRUB TABLE t WITH OPTIONS INDEX ALL statement ok RESET CLUSTER SETTING sql.multiple_modifications_of_table.enabled +# Multiple mutations can also be explicitly allowed with a session setting. +statement ok +SET enable_multiple_modifications_of_table = true + +# Multiple updates of different rows in the same table. +query II rowsort +WITH + u1 AS (UPDATE t SET j = j - 40 WHERE i < 20 RETURNING *), + u2 AS (UPDATE t SET j = j + 40 WHERE i >= 20 RETURNING *) +TABLE u1 UNION ALL TABLE u2 +---- +2 60 +4 60 +6 60 +8 60 +20 440 + +# Check for corruption. +query TTTTTTTT +EXPERIMENTAL SCRUB TABLE t WITH OPTIONS INDEX ALL +---- + +statement ok +RESET enable_multiple_modifications_of_table + # Tests with multiple mutations on the same table, modifying the same # rows. These testcases vary the type of mutation and the form. All should fail # with an error. When issue 70731 is fixed, some might no longer fail. diff --git a/pkg/sql/opt/optbuilder/util.go b/pkg/sql/opt/optbuilder/util.go index a1e6c0fa9756..19ea0a893a32 100644 --- a/pkg/sql/opt/optbuilder/util.go +++ b/pkg/sql/opt/optbuilder/util.go @@ -27,6 +27,7 @@ import ( "github.com/cockroachdb/errors" ) +// TODO(michae2): Remove this when #70731 is fixed. var multipleModificationsOfTableEnabled = settings.RegisterBoolSetting( "sql.multiple_modifications_of_table.enabled", "if true, allow statements containing multiple INSERT ON CONFLICT, UPSERT, UPDATE, or DELETE "+ @@ -491,7 +492,9 @@ func (b *Builder) checkMultipleMutations(tab cat.Table, simpleInsert bool) { } allSimpleInserts = allSimpleInserts && simpleInsert b.areAllTableMutationsSimpleInserts[tab.ID()] = allSimpleInserts - if !allSimpleInserts && !multipleModificationsOfTableEnabled.Get(&b.evalCtx.Settings.SV) { + if !allSimpleInserts && + !multipleModificationsOfTableEnabled.Get(&b.evalCtx.Settings.SV) && + !b.evalCtx.SessionData().MultipleModificationsOfTable { panic(pgerror.Newf( pgcode.FeatureNotSupported, "multiple modification subqueries of the same table %q are not supported unless "+ diff --git a/pkg/sql/sessiondatapb/local_only_session_data.pb.go b/pkg/sql/sessiondatapb/local_only_session_data.pb.go index eda3e472214b..f9e214691241 100644 --- a/pkg/sql/sessiondatapb/local_only_session_data.pb.go +++ b/pkg/sql/sessiondatapb/local_only_session_data.pb.go @@ -211,6 +211,10 @@ type LocalOnlySessionData struct { // considered large, and worthy of logging and/or disabling depending on other // settings. LargeFullScanRows float64 `protobuf:"fixed64,53,opt,name=large_full_scan_rows,json=largeFullScanRows,proto3" json:"large_full_scan_rows,omitempty"` + // MultipleModificationsOfTable allows statements containing multiple INSERT + // ON CONFLICT, UPSERT, UPDATE, or DELETE subqueries modifying the same table, + // at the risk of data corruption if the same row is modified multiple times. + MultipleModificationsOfTable bool `protobuf:"varint,68,opt,name=multiple_modifications_of_table,json=multipleModificationsOfTable,proto3" json:"multiple_modifications_of_table,omitempty"` } func (m *LocalOnlySessionData) Reset() { *m = LocalOnlySessionData{} } @@ -298,125 +302,127 @@ func init() { } var fileDescriptor_21ead158cf36da28 = []byte{ - // 1878 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0x4d, 0x73, 0x1c, 0xb7, - 0xd1, 0xd6, 0x5a, 0xb6, 0x5f, 0x0b, 0x14,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e7, 0xcb, 0x85, 0x0b, 0x3f, 0xbe, 0x5c, 0xb8, 0xf0, 0xd3, 0xcb, 0x85, 0x0b, 0xdf, 0x4f, - 0x9e, 0xd9, 0xf4, 0xee, 0xbb, 0x64, 0xf6, 0xcf, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x80, 0x43, - 0x39, 0xd2, 0x20, 0x0f, 0x00, 0x00, + // 1910 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0xcd, 0x72, 0x1c, 0xb7, + 0x11, 0xd6, 0x5a, 0xb6, 0x23, 0x81, 0xa2, 0x44, 0x8e, 0x28, 0x73, 0x28, 0x52, 0x5c, 0x52, 0x3f, + 0x16, 0x15, 0xd9, 0xbb, 0xb6, 0x6c, 0xa7, 0x14, 0xa7, 0xf2, 0x63, 0xfe, 0x45, 0xb2, 0x28, 0x93, + 0x9a, 0xa5, 0xac, 0x8a, 0x93, 0x2a, 0x14, 0x38, 0xd3, 0xbb, 0x8b, 0x10, 0x0b, 0xcc, 0x02, 0x18, + 0x92, 0xcb, 0x43, 0x9e, 0x21, 0x55, 0x39, 0xe7, 0x9c, 0x57, 0xf1, 0xd1, 0x47, 0x9f, 0x58, 0x09, + 0xf5, 0x16, 0x3a, 0xa5, 0xba, 0x31, 0xb3, 0x5c, 0x8a, 0xb4, 0x7d, 0xdb, 0xed, 0xef, 0xeb, 0x0f, + 0x40, 0xa3, 0xbb, 0xd1, 0xc3, 0x9a, 0xae, 0xaf, 0x9a, 0x0e, 0x9c, 0x93, 0x46, 0x67, 0xc2, 0x8b, + 0x7c, 0xa7, 0xa9, 0x4c, 0x2a, 0x14, 0x37, 0x5a, 0x0d, 0x78, 0x09, 0x70, 0x44, 0x1a, 0xb9, 0x35, + 0xde, 0x44, 0xb3, 0xa9, 0x49, 0x77, 0xad, 0x11, 0x69, 0xb7, 0xe1, 0xfa, 0xaa, 0x71,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0x69, 0x61, 0x62, 0xf1, 0xf6, 0xbf, 0x6b, 0xe7, 0xae, 0x7c, 0x8f, 0x5d, 0xa5, 0x62, 0xc9, + 0xf8, 0x1e, 0x58, 0x94, 0x2c, 0x37, 0x31, 0x1e, 0xac, 0xdf, 0x06, 0x63, 0x74, 0x87, 0x8d, 0xa7, + 0x85, 0xb5, 0x98, 0xda, 0x27, 0xdb, 0xba, 0x98, 0x5c, 0x29, 0x8d, 0x34, 0xd9, 0x44, 0x73, 0xec, + 0xb2, 0xd4, 0xa9, 0xa5, 0x44, 0x0f, 0x5f, 0x79, 0xc9, 0x89, 0x21, 0xba, 0xc5, 0xd8, 0x70, 0x42, + 0x72, 0xe1, 0x1b, 0x2e, 0xb9, 0x5c, 0x4d, 0x45, 0x6e, 0xb9, 0xf9, 0xfd, 0xff, 0xe6, 0x2f, 0x7c, + 0x7f, 0x3c, 0x5f, 0xfb, 0xe1, 0x78, 0xbe, 0xf6, 0xe3, 0xf1, 0x7c, 0xed, 0xbf, 0xc7, 0xf3, 0xb5, + 0x7f, 0xbe, 0x9e, 0xbf, 0xf0, 0xc3, 0xeb, 0xf9, 0x0b, 0x3f, 0xbe, 0x9e, 0xbf, 0xf0, 0xdd, 0xf8, + 0xa9, 0x43, 0xef, 0xbc, 0x4f, 0x35, 0xf3, 0xd9, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x89, + 0xcd, 0xf1, 0x67, 0x0f, 0x00, 0x00, } func (m *LocalOnlySessionData) Marshal() (dAtA []byte, err error) { @@ -439,6 +445,18 @@ func (m *LocalOnlySessionData) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MultipleModificationsOfTable { + i-- + if m.MultipleModificationsOfTable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x4 + i-- + dAtA[i] = 0xa0 + } if m.LargeFullScanRows != 0 { i -= 8 encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.LargeFullScanRows)))) @@ -1191,6 +1209,9 @@ func (m *LocalOnlySessionData) Size() (n int) { if m.LargeFullScanRows != 0 { n += 10 } + if m.MultipleModificationsOfTable { + n += 3 + } return n } @@ -2396,6 +2417,26 @@ func (m *LocalOnlySessionData) Unmarshal(dAtA []byte) error { v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 m.LargeFullScanRows = float64(math.Float64frombits(v)) + case 68: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MultipleModificationsOfTable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLocalOnlySessionData + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MultipleModificationsOfTable = bool(v != 0) default: iNdEx = preIndex skippy, err := skipLocalOnlySessionData(dAtA[iNdEx:]) diff --git a/pkg/sql/sessiondatapb/local_only_session_data.proto b/pkg/sql/sessiondatapb/local_only_session_data.proto index 35b06254bff8..9c1975e8ef8c 100644 --- a/pkg/sql/sessiondatapb/local_only_session_data.proto +++ b/pkg/sql/sessiondatapb/local_only_session_data.proto @@ -204,6 +204,10 @@ message LocalOnlySessionData { // considered large, and worthy of logging and/or disabling depending on other // settings. double large_full_scan_rows = 53; + // MultipleModificationsOfTable allows statements containing multiple INSERT + // ON CONFLICT, UPSERT, UPDATE, or DELETE subqueries modifying the same table, + // at the risk of data corruption if the same row is modified multiple times. + bool multiple_modifications_of_table = 68; /////////////////////////////////////////////////////////////////////////// // WARNING: consider whether a session parameter you're adding needs to // diff --git a/pkg/sql/vars.go b/pkg/sql/vars.go index 489f37f7d87e..ab8e8c2aab36 100644 --- a/pkg/sql/vars.go +++ b/pkg/sql/vars.go @@ -1765,6 +1765,24 @@ var varGen = map[string]sessionVar{ return strconv.FormatInt(txnRowsReadErr.Get(sv), 10) }, }, + + // TODO(michae2): Remove this when #70731 is fixed. + // CockroachDB extension. + `enable_multiple_modifications_of_table`: { + GetStringVal: makePostgresBoolGetStringValFn(`enable_multiple_modifications_of_table`), + Set: func(_ context.Context, m sessionDataMutator, s string) error { + b, err := paramparse.ParseBoolVar("enable_multiple_modifications_of_table", s) + if err != nil { + return err + } + m.SetMultipleModificationsOfTable(b) + return nil + }, + Get: func(evalCtx *extendedEvalContext) string { + return formatBoolAsPostgresSetting(evalCtx.SessionData().MultipleModificationsOfTable) + }, + GlobalDefault: globalFalse, + }, } const compatErrMsg = "this parameter is currently recognized only for compatibility and has no effect in CockroachDB."