diff --git a/build/teamcity/cockroach/nightlies/sqllogic_corpus_nightly_impl.sh b/build/teamcity/cockroach/nightlies/sqllogic_corpus_nightly_impl.sh index c48b8472d106..0c4d26ff79a0 100755 --- a/build/teamcity/cockroach/nightlies/sqllogic_corpus_nightly_impl.sh +++ b/build/teamcity/cockroach/nightlies/sqllogic_corpus_nightly_impl.sh @@ -75,7 +75,7 @@ if [ $exit_status = 0 ]; then fi # Generate a corpus for all mixed version variants -for config in local-mixed-22.2-23.1; do +for config in local-mixed-23.1; do $BAZEL_BIN/pkg/cmd/bazci/bazci_/bazci test -- --config=ci \ //pkg/sql/logictest/tests/$config/... \ --test_arg=--declarative-corpus=$ARTIFACTS_DIR/corpus-mixed \ diff --git a/pkg/BUILD.bazel b/pkg/BUILD.bazel index 475783f7d48e..61ef6c0c1926 100644 --- a/pkg/BUILD.bazel +++ b/pkg/BUILD.bazel @@ -51,7 +51,7 @@ ALL_TESTS = [ "//pkg/ccl/logictestccl/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/ccl/logictestccl/tests/fakedist:fakedist_test", "//pkg/ccl/logictestccl/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/ccl/logictestccl/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/ccl/logictestccl/tests/local-vec-off:local-vec-off_test", "//pkg/ccl/logictestccl/tests/local:local_test", "//pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs:multiregion-15node-5region-3azs_test", @@ -452,7 +452,7 @@ ALL_TESTS = [ "//pkg/sql/logictest/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/sql/logictest/tests/fakedist:fakedist_test", "//pkg/sql/logictest/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/sql/logictest/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/sql/logictest/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/sql/logictest/tests/local-vec-off:local-vec-off_test", "//pkg/sql/logictest/tests/local:local_test", "//pkg/sql/logictest/tests/multiregion-9node-3region-3azs:multiregion-9node-3region-3azs_test", @@ -469,7 +469,7 @@ ALL_TESTS = [ "//pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/sql/opt/exec/execbuilder/tests/fakedist:fakedist_test", "//pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/sql/opt/exec/execbuilder/tests/local-vec-off:local-vec-off_test", "//pkg/sql/opt/exec/execbuilder/tests/local:local_test", "//pkg/sql/opt/exec/execbuilder:execbuilder_test", @@ -569,7 +569,7 @@ ALL_TESTS = [ "//pkg/sql/sqlitelogictest/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/sql/sqlitelogictest/tests/fakedist:fakedist_test", "//pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/sql/sqlitelogictest/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/sql/sqlitelogictest/tests/local-vec-off:local-vec-off_test", "//pkg/sql/sqlitelogictest/tests/local:local_test", "//pkg/sql/sqlliveness/slinstance:slinstance_test", @@ -856,7 +856,7 @@ GO_TARGETS = [ "//pkg/ccl/logictestccl/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/ccl/logictestccl/tests/fakedist:fakedist_test", "//pkg/ccl/logictestccl/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/ccl/logictestccl/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/ccl/logictestccl/tests/local-vec-off:local-vec-off_test", "//pkg/ccl/logictestccl/tests/local:local_test", "//pkg/ccl/logictestccl/tests/multiregion-15node-5region-3azs:multiregion-15node-5region-3azs_test", @@ -1848,7 +1848,7 @@ GO_TARGETS = [ "//pkg/sql/logictest/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/sql/logictest/tests/fakedist:fakedist_test", "//pkg/sql/logictest/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/sql/logictest/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/sql/logictest/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/sql/logictest/tests/local-vec-off:local-vec-off_test", "//pkg/sql/logictest/tests/local:local_test", "//pkg/sql/logictest/tests/multiregion-9node-3region-3azs:multiregion-9node-3region-3azs_test", @@ -1874,7 +1874,7 @@ GO_TARGETS = [ "//pkg/sql/opt/exec/execbuilder/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/sql/opt/exec/execbuilder/tests/fakedist:fakedist_test", "//pkg/sql/opt/exec/execbuilder/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/sql/opt/exec/execbuilder/tests/local-vec-off:local-vec-off_test", "//pkg/sql/opt/exec/execbuilder/tests/local:local_test", "//pkg/sql/opt/exec/execbuilder:execbuilder", @@ -2113,7 +2113,7 @@ GO_TARGETS = [ "//pkg/sql/sqlitelogictest/tests/fakedist-vec-off:fakedist-vec-off_test", "//pkg/sql/sqlitelogictest/tests/fakedist:fakedist_test", "//pkg/sql/sqlitelogictest/tests/local-legacy-schema-changer:local-legacy-schema-changer_test", - "//pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1:local-mixed-22_2-23_1_test", + "//pkg/sql/sqlitelogictest/tests/local-mixed-23.1:local-mixed-23_1_test", "//pkg/sql/sqlitelogictest/tests/local-vec-off:local-vec-off_test", "//pkg/sql/sqlitelogictest/tests/local:local_test", "//pkg/sql/sqlitelogictest:sqlitelogictest", diff --git a/pkg/ccl/backupccl/testdata/backup-restore/restore-mixed-version b/pkg/ccl/backupccl/testdata/backup-restore/restore-mixed-version index 6f4a5f77da01..569c2c5c98aa 100644 --- a/pkg/ccl/backupccl/testdata/backup-restore/restore-mixed-version +++ b/pkg/ccl/backupccl/testdata/backup-restore/restore-mixed-version @@ -1,4 +1,4 @@ -new-cluster name=s1 beforeVersion=23_1_Start disable-tenant +new-cluster name=s1 beforeVersion=23_2_Start disable-tenant ---- exec-sql @@ -15,7 +15,7 @@ BACKUP INTO 'nodelocal://1/full_cluster_backup/'; # This is a cluster where the cluster version is behind the binary version. Such # a condition only occurs when the user has upgraded the node to a new major # version but has not yet finalized the upgrade. -new-cluster name=s2 beforeVersion=23_1_Start share-io-dir=s1 disable-tenant +new-cluster name=s2 beforeVersion=23_2_Start share-io-dir=s1 disable-tenant ---- exec-sql expect-error-regex=(pq: cluster restore not supported during major version upgrade: restore started at cluster version .* but binary version is.*) diff --git a/pkg/ccl/cliccl/ear_test.go b/pkg/ccl/cliccl/ear_test.go index 9b2970867f4d..643806273344 100644 --- a/pkg/ccl/cliccl/ear_test.go +++ b/pkg/ccl/cliccl/ear_test.go @@ -158,13 +158,13 @@ func TestList(t *testing.T) { 000004.log: env type: Data, AES128_CTR keyID: bbb65a9d114c2a18740f27b6933b74f61018bd5adf545c153b48ffe6473336ef - nonce: 31 d3 cd 5a 69 e2 13 64 21 53 57 64 - counter: 3952287331 + nonce: d1 05 79 53 68 35 a0 f1 44 01 22 79 + counter: 1497766936 000005.sst: env type: Data, AES128_CTR keyID: bbb65a9d114c2a18740f27b6933b74f61018bd5adf545c153b48ffe6473336ef - nonce: 23 d9 b2 e1 39 b0 87 ed f9 6d 49 20 - counter: 3481614039 + nonce: d0 b1 31 4b 08 b9 f6 08 7e e6 af 40 + counter: 2167389540 COCKROACHDB_DATA_KEYS_000001_monolith: env type: Store, AES128_CTR keyID: f594229216d81add7811c4360212eb7629b578ef4eab6e5d05679b3c5de48867 @@ -190,11 +190,11 @@ marker.datakeys.000001.COCKROACHDB_DATA_KEYS_000001_monolith: keyID: f594229216d81add7811c4360212eb7629b578ef4eab6e5d05679b3c5de48867 nonce: 55 d7 d4 27 6c 97 9b dd f1 5d 40 c8 counter: 467030050 -marker.format-version.000009.010: +marker.format-version.000012.013: env type: Data, AES128_CTR keyID: bbb65a9d114c2a18740f27b6933b74f61018bd5adf545c153b48ffe6473336ef - nonce: 6e 34 f4 3c 11 43 1a f5 69 ce 33 f1 - counter: 2398097086 + nonce: 86 a7 78 ad 4b da 62 56 d5 e2 d1 70 + counter: 798955289 marker.manifest.000001.MANIFEST-000001: env type: Data, AES128_CTR keyID: bbb65a9d114c2a18740f27b6933b74f61018bd5adf545c153b48ffe6473336ef diff --git a/pkg/ccl/kvccl/kvtenantccl/upgradeccl/tenant_upgrade_test.go b/pkg/ccl/kvccl/kvtenantccl/upgradeccl/tenant_upgrade_test.go index 599e752ab81c..5ee719c93ca5 100644 --- a/pkg/ccl/kvccl/kvtenantccl/upgradeccl/tenant_upgrade_test.go +++ b/pkg/ccl/kvccl/kvtenantccl/upgradeccl/tenant_upgrade_test.go @@ -393,7 +393,7 @@ func TestTenantUpgrade(t *testing.T) { // - v0 corresponds to the bootstrapped version of the tenant, // - v1, v2 correspond to adjacent releases. func v0v1v2() (roachpb.Version, roachpb.Version, roachpb.Version) { - v0 := clusterversion.ByKey(clusterversion.V22_2) + v0 := clusterversion.ByKey(clusterversion.BinaryMinSupportedVersionKey) v1 := clusterversion.TestingBinaryVersion v2 := clusterversion.TestingBinaryVersion if v1.Internal > 2 { @@ -409,6 +409,7 @@ func v0v1v2() (roachpb.Version, roachpb.Version, roachpb.Version) { func TestTenantUpgradeFailure(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) + skip.WithIssue(t, 112209) v0 := clusterversion.TestingBinaryMinSupportedVersion v2 := clusterversion.TestingBinaryVersion diff --git a/pkg/ccl/logictestccl/testdata/logic_test/changefeed b/pkg/ccl/logictestccl/testdata/logic_test/changefeed index 6c699623d170..15d58fde01cf 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/changefeed +++ b/pkg/ccl/logictestccl/testdata/logic_test/changefeed @@ -1,4 +1,4 @@ -# LogicTest: local local-mixed-22.2-23.1 +# LogicTest: local local-mixed-23.1 statement ok CREATE TABLE t () diff --git a/pkg/ccl/logictestccl/testdata/logic_test/redact_descriptor b/pkg/ccl/logictestccl/testdata/logic_test/redact_descriptor index 174e6df5fd6a..bd717ef38412 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/redact_descriptor +++ b/pkg/ccl/logictestccl/testdata/logic_test/redact_descriptor @@ -43,7 +43,6 @@ CREATE VIEW redacted_descriptors AS # The legacy and declarative schema changer have slightly different implementation # of `ADD COLUMN ... DEFAULT ... CHECK(...)`, resulting in slightly different # descriptor. We will skip the config that uses legacy schema changer. -skipif config local-mixed-22.2-23.1 skipif config local-legacy-schema-changer query T SELECT descriptor from redacted_descriptors where id = 'collate_partition'::REGCLASS; @@ -173,135 +172,6 @@ SELECT descriptor from redacted_descriptors where id = 'collate_partition'::REGC } } -onlyif config local-mixed-22.2-23.1 -query T -SELECT descriptor from redacted_descriptors where id = 'collate_partition'::REGCLASS; ----- -{ - "table": { - "checks": [ - { - "columnIds": [ - 2 - ], - "constraintId": 2, - "expr": "b != '_':::STRING", - "name": "check_b" - } - ], - "columns": [ - { - "id": 1, - "name": "a", - "type": { - "family": "CollatedStringFamily", - "locale": "da", - "oid": 25 - } - }, - { - "defaultExpr": "'_':::STRING", - "id": 2, - "name": "b", - "nullable": true, - "type": { - "family": "StringFamily", - "oid": 25 - } - } - ], - "createAsOfTime": { - "wallTime": "0" - }, - "families": [ - { - "columnIds": [ - 1, - 2 - ], - "columnNames": [ - "a", - "b" - ], - "defaultColumnId": 2, - "name": "primary" - } - ], - "formatVersion": 3, - "id": 106, - "modificationTime": {}, - "name": "collate_partition", - "nextColumnId": 3, - "nextConstraintId": 3, - "nextFamilyId": 1, - "nextIndexId": 2, - "nextMutationId": 2, - "parentId": 104, - "primaryIndex": { - "compositeColumnIds": [ - 1 - ], - "constraintId": 1, - "createdAtNanos": "0", - "encodingType": 1, - "foreignKey": {}, - "geoConfig": {}, - "id": 1, - "interleave": {}, - "keyColumnDirections": [ - "ASC" - ], - "keyColumnIds": [ - 1 - ], - "keyColumnNames": [ - "a" - ], - "name": "collate_partition_pkey", - "partitioning": { - "numColumns": 1, - "range": [ - { - "fromInclusive": "Xw==", - "name": "p1", - "toExclusive": "Xw==" - } - ] - }, - "sharded": {}, - "storeColumnIds": [ - 2 - ], - "storeColumnNames": [ - "b" - ], - "unique": true, - "version": 4 - }, - "privileges": { - "ownerProto": "root", - "users": [ - { - "privileges": "2", - "userProto": "admin", - "withGrantOption": "2" - }, - { - "privileges": "2", - "userProto": "root", - "withGrantOption": "2" - } - ], - "version": 2 - }, - "replacementOf": { - "time": {} - }, - "unexposedParentSchemaId": 105, - "version": "5" - } -} - statement ok CREATE TABLE subpartition ( a INT, b INT, c INT, diff --git a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/ccl/logictestccl/tests/local-mixed-23.1/BUILD.bazel similarity index 95% rename from pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel rename to pkg/ccl/logictestccl/tests/local-mixed-23.1/BUILD.bazel index baa633a96639..4878e95979b0 100644 --- a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/ccl/logictestccl/tests/local-mixed-23.1/BUILD.bazel @@ -1,7 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( - name = "local-mixed-22_2-23_1_test", + name = "local-mixed-23_1_test", size = "enormous", srcs = ["generated_test.go"], args = select({ diff --git a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/generated_test.go b/pkg/ccl/logictestccl/tests/local-mixed-23.1/generated_test.go similarity index 99% rename from pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/generated_test.go rename to pkg/ccl/logictestccl/tests/local-mixed-23.1/generated_test.go index 071231559fe3..d6082e807060 100644 --- a/pkg/ccl/logictestccl/tests/local-mixed-22.2-23.1/generated_test.go +++ b/pkg/ccl/logictestccl/tests/local-mixed-23.1/generated_test.go @@ -8,7 +8,7 @@ // Code generated by generate-logictest, DO NOT EDIT. -package testlocal_mixed_222_231 +package testlocal_mixed_231 import ( "os" diff --git a/pkg/ccl/serverccl/server_startup_guardrails_test.go b/pkg/ccl/serverccl/server_startup_guardrails_test.go index df40905423f5..92c190d152dd 100644 --- a/pkg/ccl/serverccl/server_startup_guardrails_test.go +++ b/pkg/ccl/serverccl/server_startup_guardrails_test.go @@ -30,17 +30,26 @@ import ( func TestServerStartupGuardrails(t *testing.T) { defer leaktest.AfterTest(t)() - // We need to conditionally apply the DevOffset for the version - // returned by this function to work both on master (where the dev - // offset applies) and on release branches (where it doesn't). - v := func(major, minor int32) roachpb.Version { - binaryVersion := clusterversion.ByKey(clusterversion.BinaryVersionKey) - var offset int32 - if binaryVersion.Major > clusterversion.DevOffset { - offset = clusterversion.DevOffset + // The tests below will use the minimum supported version as the logical + // version. + logicalVersionKey := clusterversion.BinaryMinSupportedVersionKey + logicalVersion := clusterversion.ByKey(logicalVersionKey) + + prev := func(v roachpb.Version) roachpb.Version { + t.Helper() + if v.Minor < 1 || v.Minor > 2 || v.Patch != 0 || v.Internal != 0 { + t.Fatalf("invalid version %v", v) + } + if v.Minor > 1 { + v.Minor-- + } else { + v.Major-- + v.Minor = 2 } - return roachpb.Version{Major: offset + major, Minor: minor} + return v } + minusOne := prev(logicalVersion) + minusTwo := prev(minusOne) tests := []struct { storageBinaryVersion roachpb.Version @@ -53,23 +62,23 @@ func TestServerStartupGuardrails(t *testing.T) { // First test case ensures that a tenant server can start if the server binary // version is not too low for the tenant logical version. { - storageBinaryVersion: v(22, 2), - storageBinaryMinSupportedVersion: v(22, 1), - tenantBinaryVersion: v(22, 2), - tenantBinaryMinSupportedVersion: v(22, 2), - TenantLogicalVersionKey: clusterversion.V22_2, + storageBinaryVersion: logicalVersion, + storageBinaryMinSupportedVersion: minusOne, + tenantBinaryVersion: logicalVersion, + tenantBinaryMinSupportedVersion: logicalVersion, + TenantLogicalVersionKey: logicalVersionKey, expErrMatch: "", }, // Second test case ensures that a tenant server is prevented from starting if // its binary version is too low for the current tenant logical version. { - storageBinaryVersion: v(22, 2), - storageBinaryMinSupportedVersion: v(22, 1), - tenantBinaryVersion: v(22, 1), - tenantBinaryMinSupportedVersion: v(21, 2), - TenantLogicalVersionKey: clusterversion.V22_2, + storageBinaryVersion: logicalVersion, + storageBinaryMinSupportedVersion: minusOne, + tenantBinaryVersion: minusOne, + tenantBinaryMinSupportedVersion: minusTwo, + TenantLogicalVersionKey: logicalVersionKey, expErrMatch: fmt.Sprintf("preventing SQL server from starting because its binary version is too low for the tenant active version: "+ - "server binary version = %v, tenant active version = %v", v(22, 1), v(22, 2)), + "server binary version = %v, tenant active version = %v", minusOne, logicalVersion), }, } @@ -89,7 +98,7 @@ func TestServerStartupGuardrails(t *testing.T) { Knobs: base.TestingKnobs{ Server: &server.TestingKnobs{ BinaryVersionOverride: test.storageBinaryVersion, - BootstrapVersionKeyOverride: clusterversion.V22_2, + BootstrapVersionKeyOverride: logicalVersionKey, DisableAutomaticVersionUpgrade: make(chan struct{}), }, SQLEvalContext: &eval.TestingKnobs{ diff --git a/pkg/clusterversion/cockroach_versions.go b/pkg/clusterversion/cockroach_versions.go index ecac00378b19..9844ee0c2696 100644 --- a/pkg/clusterversion/cockroach_versions.go +++ b/pkg/clusterversion/cockroach_versions.go @@ -530,6 +530,11 @@ const ( // ************************************************* ) +// VCurrent_Start is an alias for last Start version key (i.e the first internal +// version of the release in development). Tests should use this constant so +// they don't need to be updated when the versions change. +const VCurrent_Start = V23_2Start + func (k Key) String() string { return ByKey(k).String() } @@ -959,7 +964,7 @@ var versionsSingleton = func() keyedVersions { var V23_2 = versionsSingleton[len(versionsSingleton)-1].Key const ( - BinaryMinSupportedVersionKey = V22_2 + BinaryMinSupportedVersionKey = V23_1 ) // TODO(irfansharif): clusterversion.binary{,MinimumSupported}Version diff --git a/pkg/jobs/job_info_storage_test.go b/pkg/jobs/job_info_storage_test.go index 12e8880ccc50..63c5a0540597 100644 --- a/pkg/jobs/job_info_storage_test.go +++ b/pkg/jobs/job_info_storage_test.go @@ -12,29 +12,22 @@ package jobs_test import ( "context" - "fmt" "testing" "github.com/cockroachdb/cockroach/pkg/base" _ "github.com/cockroachdb/cockroach/pkg/ccl/backupccl" // import ccl to be able to run backups _ "github.com/cockroachdb/cockroach/pkg/cloud/impl" // register cloud storage providers - "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/jobs" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" "github.com/cockroachdb/cockroach/pkg/keyvisualizer" "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql" "github.com/cockroachdb/cockroach/pkg/sql/isql" "github.com/cockroachdb/cockroach/pkg/sql/sessiondata" "github.com/cockroachdb/cockroach/pkg/testutils" - "github.com/cockroachdb/cockroach/pkg/testutils/jobutils" "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" "github.com/cockroachdb/cockroach/pkg/upgrade/upgradebase" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/cockroachdb/cockroach/pkg/util/protoutil" "github.com/stretchr/testify/require" ) @@ -298,119 +291,3 @@ func TestAccessorsWithWrongSQLLivenessSession(t *testing.T) { }) })) } - -// TestJobInfoUpgradeRegressionTests is a regression test where a job that is -// created before V23_1JobInfoTableIsBackfilled and continues to run during the -// V23_1JobInfoTableIsBackfilled upgrade will have duplicate payload and -// progress rows in the job_info table. Prior to the fix this caused the -// InfoStorage read path to error out on seeing more than one row per jobID, -// info_key. -func TestJobInfoUpgradeRegressionTests(t *testing.T) { - defer leaktest.AfterTest(t)() - - s, sqlDB, _ := serverutils.StartServer(t, base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.BinaryMinSupportedVersionKey), - BootstrapVersionKeyOverride: clusterversion.BinaryMinSupportedVersionKey, - }, - JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(), - }, - }) - tenantOrServer := s.ApplicationLayer() - ctx := context.Background() - defer s.Stopper().Stop(ctx) - - _, err := sqlDB.Exec(`SET CLUSTER SETTING version = $1`, clusterversion.V23_1CreateSystemJobInfoTable.String()) - require.NoError(t, err) - - _, err = sqlDB.Exec(`SET CLUSTER SETTING jobs.debug.pausepoints = 'backup.after.write_lock'`) - require.NoError(t, err) - - var jobID jobspb.JobID - require.NoError(t, sqlDB.QueryRow(`BACKUP INTO 'userfile:///foo' WITH detached`).Scan(&jobID)) - runner := sqlutils.MakeSQLRunner(sqlDB) - jobutils.WaitForJobToPause(t, runner, jobID) - - runner.CheckQueryResults(t, fmt.Sprintf(`SELECT count(*) FROM system.job_info WHERE job_id = %d`, jobID), - [][]string{{"2"}}) - - // We are still at a CV before V23_1JobInfoTableIsBackfilled so `SHOW JOBS` - // and consequently `crdb_internal.jobs` and `crdb_internal.system_jobs` are - // only reading from system.jobs. Ensure we see only one row for the job. - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM [SHOW JOBS] WHERE job_id = %d", jobID), [][]string{{"1"}}) - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM crdb_internal.jobs WHERE job_id = %d", jobID), [][]string{{"1"}}) - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM crdb_internal.system_jobs WHERE id = %d", jobID), [][]string{{"1"}}) - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM crdb_internal.system_jobs WHERE status = '%s'", jobs.StatusPaused), [][]string{{"1"}}) - - _, err = sqlDB.Exec(`SET CLUSTER SETTING version = $1`, clusterversion.V23_1JobInfoTableIsBackfilled.String()) - require.NoError(t, err) - - runner.CheckQueryResults(t, fmt.Sprintf(`SELECT count(*) FROM system.job_info WHERE job_id = %d`, jobID), - [][]string{{"4"}}) - - // Once again assert that we only see one row for the job using the different - // supported virtual indexes. - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM [SHOW JOBS] WHERE job_id = %d", jobID), [][]string{{"1"}}) - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM crdb_internal.jobs WHERE job_id = %d", jobID), [][]string{{"1"}}) - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM crdb_internal.system_jobs WHERE id = %d", jobID), [][]string{{"1"}}) - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM crdb_internal.system_jobs WHERE job_type = '%s'", jobspb.TypeBackup), [][]string{{"1"}}) - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT count(*) FROM crdb_internal.system_jobs WHERE status = '%s'", jobs.StatusPaused), [][]string{{"1"}}) - - // Now that we have 2 rows for each payload and progress, let us test that we - // read the latest one. Note, running the Update should also get rid of the - // older revisions of the payload and progress. - execCfg := tenantOrServer.ExecutorConfig().(sql.ExecutorConfig) - j, err := execCfg.JobRegistry.LoadJob(ctx, jobID) - require.NoError(t, err) - err = j.NoTxn().Update(ctx, func(txn isql.Txn, md jobs.JobMetadata, ju *jobs.JobUpdater) error { - md.Payload.Description = "updated" - md.Progress.TraceID = 123 - ju.UpdateProgress(md.Progress) - ju.UpdatePayload(md.Payload) - return nil - }) - require.NoError(t, err) - - err = execCfg.InternalDB.Txn(ctx, func(ctx context.Context, txn isql.Txn) error { - infoStorage := jobs.InfoStorageForJob(txn, jobID) - payloadBytes, _, err := infoStorage.Get(ctx, jobs.GetLegacyPayloadKey()) - if err != nil { - return err - } - var payload jobspb.Payload - require.NoError(t, protoutil.Unmarshal(payloadBytes, &payload)) - require.Equal(t, payload.Description, "updated") - - progressBytes, _, err := infoStorage.Get(ctx, jobs.GetLegacyProgressKey()) - if err != nil { - return err - } - var progress jobspb.Progress - require.NoError(t, protoutil.Unmarshal(progressBytes, &progress)) - require.Equal(t, int(progress.TraceID), 123) - return nil - }) - require.NoError(t, err) - - // Let the job complete, by virtue of this we get one more update to the - // payload + progress. - runner.Exec(t, `SET CLUSTER SETTING jobs.debug.pausepoints = ''`) - runner.Exec(t, `RESUME JOB $1`, jobID) - jobutils.WaitForJobToSucceed(t, runner, jobID) - - // Sanity check that SHOW JOBS shows the latest payload and progress. - runner.CheckQueryResults(t, fmt.Sprintf( - "SELECT description, status FROM [SHOW JOBS] WHERE job_id = %d", jobID), - [][]string{{"updated", string(jobs.StatusSucceeded)}}) -} diff --git a/pkg/sql/catalog/bootstrap/initial_values.go b/pkg/sql/catalog/bootstrap/initial_values.go index c082876ace7f..ce9564721ae3 100644 --- a/pkg/sql/catalog/bootstrap/initial_values.go +++ b/pkg/sql/catalog/bootstrap/initial_values.go @@ -59,12 +59,6 @@ var initialValuesFactoryByKey = map[clusterversion.Key]initialValuesFactoryFn{ nonSystem: nonSystem231, nonSystemHash: nonSystem231SHA256, }.build, - clusterversion.V22_2: hardCodedInitialValues{ - system: system222, - systemHash: system222SHA256, - nonSystem: nonSystem222, - nonSystemHash: nonSystem222SHA256, - }.build, } // buildLatestInitialValues is the default initial value factory. @@ -115,249 +109,7 @@ func (f hardCodedInitialValues) build( } const ( - // system222 is the hard-coded string representation of the - // initial values for a system tenant as produced by the 22.2 - // release binary. - // - // This string literal was generated by copying over the expected results - // for the TestInitialValuesToString test in the release-22.2 branch. - system222 = `[{"key":"04646573632d696467656e","value":"01c801"} -,{"key":"8b"} -,{"key":"8b89898a89","value":"0312390a0673797374656d10011a250a0d0a0561646d696e1080101880100a0c0a04726f6f7410801018801012046e6f646518022200280140004a00"} -,{"key":"8b898b8a89","value":"030afb020a0a64657363726970746f721803200128013a0042270a02696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a64657363726970746f7210021a0c08081000180030005011600020013000680070007800800100880100980100480352670a077072696d61727910011801220269642a0a64657363726970746f72300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b201130a077072696d61727910001a02696420012800b201240a1066616d5f325f64657363726970746f7210021a0a64657363726970746f7220022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b898c8a89","value":"030aaa050a0575736572731804200128013a00422d0a08757365726e616d6510011a0c0807100018003000501960002000300068007000780080010088010098010042330a0e68617368656450617373776f726410021a0c0808100018003000501160002001300068007000780080010088010098010042320a066973526f6c6510031a0c08001000180030005010600020002a0566616c73653000680070007800800100880100980100422c0a07757365725f696410041a0c080c100018003000501a60002000300068007000780080010088010098010048055286010a077072696d617279100118012208757365726e616d652a0e68617368656450617373776f72642a066973526f6c652a07757365725f6964300140004a10080010001a00200028003000380040005a007002700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00102e001005a6a0a1175736572735f757365725f69645f696478100218012207757365725f69643004380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201240a077072696d61727910001a08757365726e616d651a07757365725f6964200120042804b2012c0a1466616d5f325f68617368656450617373776f726410021a0e68617368656450617373776f726420022802b2011c0a0c66616d5f335f6973526f6c6510031a066973526f6c6520032803b80104c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b898d8a89","value":"030aea020a057a6f6e65731805200128013a0042270a02696410011a0c08011040180030005014600020003000680070007800800100880100980100422b0a06636f6e66696710021a0c08081000180030005011600020013000680070007800800100880100980100480352630a077072696d61727910011801220269642a06636f6e666967300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201130a077072696d61727910001a02696420012800b2011c0a0c66616d5f325f636f6e66696710021a06636f6e66696720022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b898e8a89","value":"030aa9040a0873657474696e67731806200128013a0042290a046e616d6510011a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510021a0c0807100018003000501960002000300068007000780080010088010098010042440a0b6c6173745570646174656410031a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422e0a0976616c75655479706510041a0c0807100018003000501960002001300068007000780080010088010098010048055280010a077072696d6172791001180122046e616d652a0576616c75652a0b6c617374557064617465642a0976616c756554797065300140004a10080010001a00200028003000380040005a007002700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201590a2666616d5f305f6e616d655f76616c75655f6c617374557064617465645f76616c75655479706510001a046e616d651a0576616c75651a0b6c617374557064617465641a0976616c75655479706520012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89908a89","value":"030a94030a0774656e616e74731808200128013a0042270a02696410011a0c0801104018003000501460002000300068007000780080010088010098010042310a0661637469766510021a0c08001000180030005010600020002a0474727565300068007000780080010088010098010042290a04696e666f10031a0c080810001800300050116000200130006800700078008001008801009801004804526b0a077072696d61727910011801220269642a066163746976652a04696e666f300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b201250a077072696d61727910001a0269641a066163746976651a04696e666f2001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89938a89","value":"030afa030a056c65617365180b200128013a00422b0a0664657363494410011a0c08011040180030005014600020003000680070007800800100880100980100422c0a0776657273696f6e10021a0c08011040180030005014600020003000680070007800800100880100980100422b0a066e6f6465494410031a0c0801104018003000501460002000300068007000780080010088010098010042300a0a65787069726174696f6e10041a0d080510001800300050da0860002000300068007000780080010088010098010048055286010a077072696d617279100118012206646573634944220776657273696f6e220a65787069726174696f6e22066e6f64654944300130023004300340004000400040004a10080010001a00200028003000380040005a007a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2013a0a077072696d61727910001a066465736349441a0776657273696f6e1a066e6f646549441a0a65787069726174696f6e20012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89948a89","value":"030afa050a086576656e746c6f67180c200128013a00422f0a0974696d657374616d7010011a0d080510001800300050da08600020003000680070007800800100880100980100422e0a096576656e745479706510021a0c08071000180030005019600020003000680070007800800100880100980100422d0a08746172676574494410031a0c0801104018003000501460002000300068007000780080010088010098010042300a0b7265706f7274696e67494410041a0c0801104018003000501460002000300068007000780080010088010098010042290a04696e666f10051a0c0807100018003000501960002001300068007000780080010088010098010042380a08756e69717565494410061a0c08081000180030005011600020002a09757569645f7634282930006800700078008001008801009801004807529e010a077072696d61727910011801220974696d657374616d702208756e6971756549442a096576656e74547970652a0874617267657449442a0b7265706f7274696e6749442a04696e666f30013006400040004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201260a077072696d61727910001a0974696d657374616d701a08756e697175654944200120062800b201220a0f66616d5f325f6576656e745479706510021a096576656e745479706520022802b201200a0e66616d5f335f746172676574494410031a08746172676574494420032803b201260a1166616d5f345f7265706f7274696e67494410041a0b7265706f7274696e67494420042804b201180a0a66616d5f355f696e666f10051a04696e666f20052805b80106c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89958a89","value":"030ad9060a0872616e67656c6f67180d200128013a00422f0a0974696d657374616d7010011a0d080510001800300050da08600020003000680070007800800100880100980100422c0a0772616e6765494410021a0c08011040180030005014600020003000680070007800800100880100980100422c0a0773746f7265494410031a0c08011040180030005014600020003000680070007800800100880100980100422e0a096576656e745479706510041a0c0807100018003000501960002000300068007000780080010088010098010042310a0c6f7468657252616e6765494410051a0c0801104018003000501460002001300068007000780080010088010098010042290a04696e666f10061a0c08071000180030005019600020013000680070007800800100880100980100423d0a08756e69717565494410071a0c08011040180030005014600020002a0e756e697175655f726f77696428293000680070007800800100880100980100480852a9010a077072696d61727910011801220974696d657374616d702208756e6971756549442a0772616e676549442a0773746f726549442a096576656e74547970652a0c6f7468657252616e676549442a04696e666f30013007400040004a10080010001a00200028003000380040005a00700270037004700570067a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201260a077072696d61727910001a0974696d657374616d701a08756e697175654944200120072800b2011e0a0d66616d5f325f72616e6765494410021a0772616e6765494420022802b2011e0a0d66616d5f335f73746f7265494410031a0773746f7265494420032803b201220a0f66616d5f345f6576656e745479706510041a096576656e745479706520042804b201280a1266616d5f355f6f7468657252616e6765494410051a0c6f7468657252616e6765494420052805b201180a0a66616d5f365f696e666f10061a04696e666f20062806b80107c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89968a89","value":"030ad1030a027569180e200128013a0042280a036b657910011a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510021a0c0808100018003000501160002001300068007000780080010088010098010042310a0b6c6173745570646174656410031a0d080510001800300050da08600020003000680070007800800100880100980100480452720a077072696d6172791001180122036b65792a0576616c75652a0b6c61737455706461746564300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201140a077072696d61727910001a036b657920012800b2011a0a0b66616d5f325f76616c756510021a0576616c756520022802b201260a1166616d5f335f6c6173745570646174656410031a0b6c6173745570646174656420032803b80104c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89978a89","value":"030ae50d0a046a6f6273180f200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f77696428293000680070007800800100880100980100422b0a0673746174757310021a0c0807100018003000501960002000300068007000780080010088010098010042400a076372656174656410031a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422c0a077061796c6f616410041a0c08081000180030005011600020003000680070007800800100880100980100422d0a0870726f677265737310051a0c0808100018003000501160002001300068007000780080010088010098010042340a0f637265617465645f62795f7479706510061a0c0807100018003000501960002001300068007000780080010088010098010042320a0d637265617465645f62795f696410071a0c0801104018003000501460002001300068007000780080010088010098010042350a10636c61696d5f73657373696f6e5f696410081a0c0808100018003000501160002001300068007000780080010088010098010042360a11636c61696d5f696e7374616e63655f696410091a0c08011040180030005014600020013000680070007800800100880100980100422d0a086e756d5f72756e73100a1a0c08011040180030005014600020013000680070007800800100880100980100422e0a086c6173745f72756e100b1a0d080510001800300050da08600020013000680070007800800100880100980100480c52ea010a077072696d61727910011801220269642a067374617475732a07637265617465642a077061796c6f61642a0870726f67726573732a0f637265617465645f62795f747970652a0d637265617465645f62795f69642a10636c61696d5f73657373696f6e5f69642a11636c61696d5f696e7374616e63655f69642a086e756d5f72756e732a086c6173745f72756e300140004a10080010001a00200028003000380040005a0070027003700470057006700770087009700a700b7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a7c0a176a6f62735f7374617475735f637265617465645f696478100218002206737461747573220763726561746564300230033801400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa4010a266a6f62735f637265617465645f62795f747970655f637265617465645f62795f69645f69647810031800220f637265617465645f62795f74797065220d637265617465645f62795f69642a06737461747573300630073801400040004a10080010001a00200028003000380040005a0070027a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005abc020a126a6f62735f72756e5f73746174735f696478100418002210636c61696d5f73657373696f6e5f696422067374617475732207637265617465642a086c6173745f72756e2a086e756d5f72756e732a11636c61696d5f696e7374616e63655f696430083002300338014000400040004a10080010001a00200028003000380040005a00700b700a70097a0408002000800100880100900103980100a20106080012001800a80100b20100ba01810173746174757320494e20282772756e6e696e67273a3a3a535452494e472c2027726576657274696e67273a3a3a535452494e472c202770656e64696e67273a3a3a535452494e472c202770617573652d726571756573746564273a3a3a535452494e472c202763616e63656c2d726571756573746564273a3a3a535452494e4729c00100c80100d00100e0010060056a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2016f0a1f66616d5f305f69645f7374617475735f637265617465645f7061796c6f616410001a0269641a067374617475731a07637265617465641a077061796c6f61641a0f637265617465645f62795f747970651a0d637265617465645f62795f69642001200220032004200620072800b2011a0a0870726f677265737310011a0870726f677265737320052805b2014c0a05636c61696d10021a10636c61696d5f73657373696f6e5f69641a11636c61696d5f696e7374616e63655f69641a086e756d5f72756e731a086c6173745f72756e20082009200a200b2800b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899b8a89","value":"030a8e0b0a0c7765625f73657373696f6e731813200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042310a0c68617368656453656372657410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a08757365726e616d6510031a0c0807100018003000501960002000300068007000780080010088010098010042420a0963726561746564417410041a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422f0a0965787069726573417410051a0d080510001800300050da08600020003000680070007800800100880100980100422f0a097265766f6b6564417410061a0d080510001800300050da0860002001300068007000780080010088010098010042430a0a6c61737455736564417410071a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422e0a096175646974496e666f10081a0c08071000180030005019600020013000680070007800800100880100980100480952b7010a077072696d61727910011801220269642a0c6861736865645365637265742a08757365726e616d652a096372656174656441742a096578706972657341742a097265766f6b656441742a0a6c6173745573656441742a096175646974496e666f300140004a10080010001a00200028003000380040005a0070027003700470057006700770087a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a750a1a7765625f73657373696f6e735f6578706972657341745f6964781002180022096578706972657341743005380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a750a1a7765625f73657373696f6e735f6372656174656441745f6964781003180022096372656174656441743004380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a750a1a7765625f73657373696f6e735f7265766f6b656441745f6964781004180022097265766f6b656441743006380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a770a1b7765625f73657373696f6e735f6c6173745573656441745f69647810051800220a6c6173745573656441743007380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060066a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201bb010a5166616d5f305f69645f6861736865645365637265745f757365726e616d655f6372656174656441745f6578706972657341745f7265766f6b656441745f6c6173745573656441745f6175646974496e666f10001a0269641a0c6861736865645365637265741a08757365726e616d651a096372656174656441741a096578706972657341741a097265766f6b656441741a0a6c6173745573656441741a096175646974496e666f200120022003200420052006200720082800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899c8a89","value":"030adb080a107461626c655f737461746973746963731814200128013a00422c0a077461626c65494410011a0c0801104018003000501460002000300068007000780080010088010098010042400a0b737461746973746963494410021a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042290a046e616d6510031a0c08071000180030005019600020013000680070007800800100880100980100423f0a09636f6c756d6e49447310041a1d080f104018003000380150f8075a0c08011040180030005014600060002000300068007000780080010088010098010042420a0963726561746564417410051a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422d0a08726f77436f756e7410061a0c0801104018003000501460002000300068007000780080010088010098010042320a0d64697374696e6374436f756e7410071a0c08011040180030005014600020003000680070007800800100880100980100422e0a096e756c6c436f756e7410081a0c08011040180030005014600020003000680070007800800100880100980100422e0a09686973746f6772616d10091a0c0808100018003000501160002001300068007000780080010088010098010042360a0761766753697a65100a1a0c08011040180030005014600020002a08303a3a3a494e54383000680070007800800100880100980100480b52d3010a077072696d6172791001180122077461626c654944220b73746174697374696349442a046e616d652a09636f6c756d6e4944732a096372656174656441742a08726f77436f756e742a0d64697374696e6374436f756e742a096e756c6c436f756e742a09686973746f6772616d2a0761766753697a6530013002400040004a10080010001a00200028003000380040005a007003700470057006700770087009700a7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201e1010a5d66616d5f305f7461626c6549445f73746174697374696349445f6e616d655f636f6c756d6e4944735f6372656174656441745f726f77436f756e745f64697374696e6374436f756e745f6e756c6c436f756e745f686973746f6772616d10001a077461626c6549441a0b73746174697374696349441a046e616d651a09636f6c756d6e4944731a096372656174656441741a08726f77436f756e741a0d64697374696e6374436f756e741a096e756c6c436f756e741a09686973746f6772616d1a0761766753697a65200120022003200420052006200720082009200a2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899d8a89","value":"030aca040a096c6f636174696f6e731815200128013a0042300a0b6c6f63616c6974794b657910011a0c0807100018003000501960002000300068007000780080010088010098010042320a0d6c6f63616c69747956616c756510021a0c08071000180030005019600020003000680070007800800100880100980100422e0a086c6174697475646510031a0d0803100f1812300050a40d600020003000680070007800800100880100980100422f0a096c6f6e67697475646510041a0d0803100f1812300050a40d6000200030006800700078008001008801009801004805528e010a077072696d61727910011801220b6c6f63616c6974794b6579220d6c6f63616c69747956616c75652a086c617469747564652a096c6f6e67697475646530013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201710a3266616d5f305f6c6f63616c6974794b65795f6c6f63616c69747956616c75655f6c617469747564655f6c6f6e67697475646510001a0b6c6f63616c6974794b65791a0d6c6f63616c69747956616c75651a086c617469747564651a096c6f6e67697475646520012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899f8a89","value":"030a9c050a0c726f6c655f6d656d626572731817200128013a0042290a04726f6c6510011a0c08071000180030005019600020003000680070007800800100880100980100422b0a066d656d62657210021a0c08071000180030005019600020003000680070007800800100880100980100422c0a07697341646d696e10031a0c08001000180030005010600020003000680070007800800100880100980100480452720a077072696d617279100118012204726f6c6522066d656d6265722a07697341646d696e30013002400040004a10080010001a00200028003000380040005a0070037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a6b0a15726f6c655f6d656d626572735f726f6c655f696478100218002204726f6c653001380240004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a6f0a17726f6c655f6d656d626572735f6d656d6265725f6964781003180022066d656d6265723002380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060046a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2011f0a077072696d61727910001a04726f6c651a066d656d626572200120022800b2011e0a0d66616d5f335f697341646d696e10031a07697341646d696e20032803b80104c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a08a89","value":"030a95040a08636f6d6d656e74731818200128013a0042290a047479706510011a0c08011040180030005014600020003000680070007800800100880100980100422e0a096f626a6563745f696410021a0c08011040180030005014600020003000680070007800800100880100980100422b0a067375625f696410031a0c08011040180030005014600020003000680070007800800100880100980100422c0a07636f6d6d656e7410041a0c0807100018003000501960002000300068007000780080010088010098010048055281010a077072696d6172791001180122047479706522096f626a6563745f696422067375625f69642a07636f6d6d656e743001300230034000400040004a10080010001a00200028003000380040005a0070047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a330a0d0a0561646d696e10e00318e0030a0c0a067075626c6963102018000a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012c0a077072696d61727910001a04747970651a096f626a6563745f69641a067375625f69642001200220032800b2011e0a0d66616d5f345f636f6d6d656e7410041a07636f6d6d656e7420042804b80105c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a18a89","value":"030a90060a1c7265706c69636174696f6e5f636f6e73747261696e745f73746174731819200128013a00422c0a077a6f6e655f696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a7375627a6f6e655f696410021a0c0801104018003000501460002000300068007000780080010088010098010042290a047479706510031a0c08071000180030005019600020003000680070007800800100880100980100422b0a06636f6e66696710041a0c08071000180030005019600020003000680070007800800100880100980100422e0a097265706f72745f696410051a0c0801104018003000501460002000300068007000780080010088010098010042350a0f76696f6c6174696f6e5f737461727410061a0d080910001800300050a00960002001300068007000780080010088010098010042350a1076696f6c6174696e675f72616e67657310071a0c08011040180030005014600020003000680070007800800100880100980100480852b8010a077072696d6172791001180122077a6f6e655f6964220a7375627a6f6e655f69642204747970652206636f6e6669672a097265706f72745f69642a0f76696f6c6174696f6e5f73746172742a1076696f6c6174696e675f72616e676573300130023003300440004000400040004a10080010001a00200028003000380040005a007005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2016c0a077072696d61727910001a077a6f6e655f69641a0a7375627a6f6e655f69641a04747970651a06636f6e6669671a097265706f72745f69641a0f76696f6c6174696f6e5f73746172741a1076696f6c6174696e675f72616e67657320012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a28a89","value":"030af9040a1f7265706c69636174696f6e5f637269746963616c5f6c6f63616c6974696573181a200128013a00422c0a077a6f6e655f696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a7375627a6f6e655f696410021a0c08011040180030005014600020003000680070007800800100880100980100422d0a086c6f63616c69747910031a0c08071000180030005019600020003000680070007800800100880100980100422e0a097265706f72745f696410041a0c0801104018003000501460002000300068007000780080010088010098010042330a0e61745f7269736b5f72616e67657310051a0c080110401800300050146000200030006800700078008001008801009801004806529b010a077072696d6172791001180122077a6f6e655f6964220a7375627a6f6e655f696422086c6f63616c6974792a097265706f72745f69642a0e61745f7269736b5f72616e6765733001300230034000400040004a10080010001a00200028003000380040005a00700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201510a077072696d61727910001a077a6f6e655f69641a0a7375627a6f6e655f69641a086c6f63616c6974791a097265706f72745f69641a0e61745f7269736b5f72616e676573200120022003200420052800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a38a89","value":"030ae7060a117265706c69636174696f6e5f7374617473181b200128013a00422c0a077a6f6e655f696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a7375627a6f6e655f696410021a0c08011040180030005014600020003000680070007800800100880100980100422e0a097265706f72745f696410031a0c0801104018003000501460002000300068007000780080010088010098010042310a0c746f74616c5f72616e67657310041a0c0801104018003000501460002000300068007000780080010088010098010042370a12756e617661696c61626c655f72616e67657310051a0c08011040180030005014600020003000680070007800800100880100980100423c0a17756e6465725f7265706c6963617465645f72616e67657310061a0c08011040180030005014600020003000680070007800800100880100980100423b0a166f7665725f7265706c6963617465645f72616e67657310071a0c08011040180030005014600020003000680070007800800100880100980100480852d6010a077072696d6172791001180122077a6f6e655f6964220a7375627a6f6e655f69642a097265706f72745f69642a0c746f74616c5f72616e6765732a12756e617661696c61626c655f72616e6765732a17756e6465725f7265706c6963617465645f72616e6765732a166f7665725f7265706c6963617465645f72616e67657330013002400040004a10080010001a00200028003000380040005a00700370047005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2018e010a077072696d61727910001a077a6f6e655f69641a0a7375627a6f6e655f69641a097265706f72745f69641a0c746f74616c5f72616e6765731a12756e617661696c61626c655f72616e6765731a17756e6465725f7265706c6963617465645f72616e6765731a166f7665725f7265706c6963617465645f72616e67657320012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a48a89","value":"030ae6020a0c7265706f7274735f6d657461181c200128013a0042270a02696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0967656e65726174656410021a0d080910001800300050a009600020003000680070007800800100880100980100480352660a077072696d61727910011801220269642a0967656e657261746564300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201200a077072696d61727910001a0269641a0967656e657261746564200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a68a89","value":"030a85040a096e616d657370616365181e200128013a00422d0a08706172656e74494410011a0c0801104018003000501460002000300068007000780080010088010098010042330a0e706172656e74536368656d61494410021a0c0801104018003000501460002000300068007000780080010088010098010042290a046e616d6510031a0c0807100018003000501960002000300068007000780080010088010098010042270a02696410041a0c0801104018003000501460002001300068007000780080010088010098010048055283010a077072696d617279100118012208706172656e744944220e706172656e74536368656d61494422046e616d652a0269643001300230034000400040004a10080010001a00200028003000380040005a0070047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b201330a077072696d61727910001a08706172656e7449441a0e706172656e74536368656d6149441a046e616d652001200220032800b201140a0866616d5f345f696410041a02696420042804b80105c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a78a89","value":"030a8f050a1170726f7465637465645f74735f6d657461181f200128013a0042340a0973696e676c65746f6e10011a0c08001000180030005010600020002a04747275653000680070007800800100880100980100422c0a0776657273696f6e10021a0c0801104018003000501460002000300068007000780080010088010098010042300a0b6e756d5f7265636f72647310031a0c08011040180030005014600020003000680070007800800100880100980100422e0a096e756d5f7370616e7310041a0c0801104018003000501460002000300068007000780080010088010098010042300a0b746f74616c5f627974657310051a0c0801104018003000501460002000300068007000780080010088010098010048065296010a077072696d61727910011801220973696e676c65746f6e2a0776657273696f6e2a0b6e756d5f7265636f7264732a096e756d5f7370616e732a0b746f74616c5f6279746573300140004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201260a0973696e676c65746f6e120f636865636b5f73696e676c65746f6e18002801300038004002b201500a077072696d61727910001a0973696e676c65746f6e1a0776657273696f6e1a0b6e756d5f7265636f7264731a096e756d5f7370616e731a0b746f74616c5f6279746573200120022003200420052800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89a88a89","value":"030af3050a1470726f7465637465645f74735f7265636f7264731820200128013a0042280a02696410011a0d080e10001800300050861760002000300068007000780080010088010098010042280a02747310021a0d080310001800300050a40d600020003000680070007800800100880100980100422e0a096d6574615f7479706510031a0c0807100018003000501960002000300068007000780080010088010098010042290a046d65746110041a0c08081000180030005011600020013000680070007800800100880100980100422e0a096e756d5f7370616e7310051a0c08011040180030005014600020003000680070007800800100880100980100422a0a057370616e7310061a0c0808100018003000501160002000300068007000780080010088010098010042340a08766572696669656410071a0c08001000180030005010600020002a0566616c73653000680070007800800100880100980100422b0a0674617267657410081a0c08081000180030005011600020013000680070007800800100880100980100480952a0010a077072696d61727910011801220269642a0274732a096d6574615f747970652a046d6574612a096e756d5f7370616e732a057370616e732a0876657269666965642a06746172676574300140004a10080010001a00200028003000380040005a0070027003700470057006700770087a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b2015a0a077072696d61727910001a0269641a0274731a096d6574615f747970651a046d6574611a096e756d5f7370616e731a057370616e731a0876657269666965641a06746172676574200120022003200420052006200720082800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a98a89","value":"030ae0040a0c726f6c655f6f7074696f6e731821200128013a00422d0a08757365726e616d6510011a0c08071000180030005019600020003000680070007800800100880100980100422b0a066f7074696f6e10021a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510031a0c08071000180030005019600020013000680070007800800100880100980100422c0a07757365725f696410041a0c080c100018003000501a6000200030006800700078008001008801009801004805527f0a077072696d617279100118012208757365726e616d6522066f7074696f6e2a0576616c75652a07757365725f696430013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a6c0a1175736572735f757365725f69645f696478100218002207757365725f696430043801380240004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201370a077072696d61727910001a08757365726e616d651a066f7074696f6e1a0576616c75651a07757365725f696420012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89aa8a89","value":"030ac1030a1773746174656d656e745f62756e646c655f6368756e6b731822200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042300a0b6465736372697074696f6e10021a0c0807100018003000501960002001300068007000780080010088010098010042290a046461746110031a0c08081000180030005011600020003000680070007800800100880100980100480452700a077072696d61727910011801220269642a0b6465736372697074696f6e2a0464617461300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012a0a077072696d61727910001a0269641a0b6465736372697074696f6e1a04646174612001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89ab8a89","value":"030aa60a0a1e73746174656d656e745f646961676e6f73746963735f72657175657374731823200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042350a09636f6d706c6574656410021a0c08001000180030005010600020002a0566616c73653000680070007800800100880100980100423a0a1573746174656d656e745f66696e6765727072696e7410031a0c08071000180030005019600020003000680070007800800100880100980100423d0a1873746174656d656e745f646961676e6f73746963735f696410041a0c0801104018003000501460002001300068007000780080010088010098010042320a0c7265717565737465645f617410051a0d080910001800300050a00960002000300068007000780080010088010098010042410a156d696e5f657865637574696f6e5f6c6174656e637910061a13080610001800300050a20960006a04080010002001300068007000780080010088010098010042300a0a657870697265735f617410071a0d080910001800300050a009600020013000680070007800800100880100980100423a0a1473616d706c696e675f70726f626162696c69747910081a0d080210401800300050bd05600020013000680070007800800100880100980100480952ea010a077072696d61727910011801220269642a09636f6d706c657465642a1573746174656d656e745f66696e6765727072696e742a1873746174656d656e745f646961676e6f73746963735f69642a0c7265717565737465645f61742a156d696e5f657865637574696f6e5f6c6174656e63792a0a657870697265735f61742a1473616d706c696e675f70726f626162696c697479300140004a10080010001a00200028003000380040005a0070027003700470057006700770087a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005ac6010a0d636f6d706c657465645f696478100218002209636f6d706c65746564220269642a1573746174656d656e745f66696e6765727072696e742a156d696e5f657865637574696f6e5f6c6174656e63792a0a657870697265735f61742a1473616d706c696e675f70726f626162696c69747930023001400040004a10080010001a00200028003000380040005a0070037006700770087a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100a201620a3a73616d706c696e675f70726f626162696c697479204245545745454e20302e303a3a3a464c4f41543820414e4420312e303a3a3a464c4f415438121a636865636b5f73616d706c696e675f70726f626162696c69747918002808300038004002b201a4010a077072696d61727910001a0269641a09636f6d706c657465641a1573746174656d656e745f66696e6765727072696e741a1873746174656d656e745f646961676e6f73746963735f69641a0c7265717565737465645f61741a156d696e5f657865637574696f6e5f6c6174656e63791a0a657870697265735f61741a1473616d706c696e675f70726f626162696c697479200120022003200420052006200720082800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89ac8a89","value":"030aa5060a1573746174656d656e745f646961676e6f73746963731824200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f77696428293000680070007800800100880100980100423a0a1573746174656d656e745f66696e6765727072696e7410021a0c08071000180030005019600020003000680070007800800100880100980100422e0a0973746174656d656e7410031a0c0807100018003000501960002000300068007000780080010088010098010042320a0c636f6c6c65637465645f617410041a0d080910001800300050a009600020003000680070007800800100880100980100422b0a05747261636510051a0d081210001800300050da1d60002001300068007000780080010088010098010042430a0d62756e646c655f6368756e6b7310061a1d080f104018003000380150f8075a0c080110401800300050146000600020013000680070007800800100880100980100422a0a056572726f7210071a0c08071000180030005019600020013000680070007800800100880100980100480852b2010a077072696d61727910011801220269642a1573746174656d656e745f66696e6765727072696e742a0973746174656d656e742a0c636f6c6c65637465645f61742a0574726163652a0d62756e646c655f6368756e6b732a056572726f72300140004a10080010001a00200028003000380040005a007002700370047005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2016c0a077072696d61727910001a0269641a1573746174656d656e745f66696e6765727072696e741a0973746174656d656e741a0c636f6c6c65637465645f61741a0574726163651a0d62756e646c655f6368756e6b731a056572726f7220012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89ad8a89","value":"030ab0090a0e7363686564756c65645f6a6f62731825200128013a0042400a0b7363686564756c655f696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042320a0d7363686564756c655f6e616d6510021a0c0807100018003000501960002000300068007000780080010088010098010042420a076372656174656410031a0d080910001800300050a009600020002a136e6f7728293a3a3a54494d455354414d50545a3000680070007800800100880100980100422a0a056f776e657210041a0c08071000180030005019600020003000680070007800800100880100980100422e0a086e6578745f72756e10051a0d080910001800300050a00960002001300068007000780080010088010098010042330a0e7363686564756c655f737461746510061a0c0808100018003000501160002001300068007000780080010088010098010042320a0d7363686564756c655f6578707210071a0c0807100018003000501960002001300068007000780080010088010098010042350a107363686564756c655f64657461696c7310081a0c0808100018003000501160002001300068007000780080010088010098010042320a0d6578656375746f725f7479706510091a0c0807100018003000501960002000300068007000780080010088010098010042330a0e657865637574696f6e5f61726773100a1a0c08081000180030005011600020003000680070007800800100880100980100480b52ed010a077072696d61727910011801220b7363686564756c655f69642a0d7363686564756c655f6e616d652a07637265617465642a056f776e65722a086e6578745f72756e2a0e7363686564756c655f73746174652a0d7363686564756c655f657870722a107363686564756c655f64657461696c732a0d6578656375746f725f747970652a0e657865637574696f6e5f61726773300140004a10080010001a00200028003000380040005a0070027003700470057006700770087009700a7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a660a0c6e6578745f72756e5f6964781002180022086e6578745f72756e3005380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201380a05736368656410001a0b7363686564756c655f69641a086e6578745f72756e1a0e7363686564756c655f73746174652001200520062800b201780a056f7468657210011a0d7363686564756c655f6e616d651a07637265617465641a056f776e65721a0d7363686564756c655f657870721a107363686564756c655f64657461696c731a0d6578656375746f725f747970651a0e657865637574696f6e5f61726773200220032004200720082009200a2800b80102c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89af8a89","value":"030a93030a0b73716c6c6976656e6573731827200128013a00422f0a0a73657373696f6e5f696410011a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10021a0d080310001800300050a40d6000200030006800700078008001008801009801004803526f0a077072696d61727910011801220a73657373696f6e5f69642a0a65787069726174696f6e300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2013c0a1a66616d305f73657373696f6e5f69645f65787069726174696f6e10001a0a73657373696f6e5f69641a0a65787069726174696f6e200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b08a89","value":"030ac0040a0a6d6967726174696f6e731828200128013a00422a0a056d616a6f7210011a0c08011040180030005014600020003000680070007800800100880100980100422a0a056d696e6f7210021a0c08011040180030005014600020003000680070007800800100880100980100422a0a05706174636810031a0c08011040180030005014600020003000680070007800800100880100980100422d0a08696e7465726e616c10041a0c0801104018003000501460002000300068007000780080010088010098010042320a0c636f6d706c657465645f617410051a0d080910001800300050a00960002000300068007000780080010088010098010048065290010a077072696d6172791001180122056d616a6f7222056d696e6f72220570617463682208696e7465726e616c2a0c636f6d706c657465645f6174300130023003300440004000400040004a10080010001a00200028003000380040005a0070057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201440a077072696d61727910001a056d616a6f721a056d696e6f721a0570617463681a08696e7465726e616c1a0c636f6d706c657465645f6174200120022003200420052805b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b18a89","value":"030aaa030a0b6a6f696e5f746f6b656e731829200128013a0042280a02696410011a0d080e100018003000508617600020003000680070007800800100880100980100422b0a0673656372657410021a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10031a0d080910001800300050a009600020003000680070007800800100880100980100480452710a077072696d61727910011801220269642a067365637265742a0a65787069726174696f6e300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012b0a077072696d61727910001a0269641a067365637265741a0a65787069726174696f6e2001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b28a89","value":"030acf120a1473746174656d656e745f73746174697374696373182a200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100423f0a1a7472616e73616374696f6e5f66696e6765727072696e745f696410031a0c08081000180030005011600020003000680070007800800100880100980100422e0a09706c616e5f6861736810041a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510051a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410061a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10071a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110081a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310091a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a04706c616e100a1a0d081210001800300050da1d600020003000680070007800800100880100980100429c020a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38100b1a0c080110201800300050176000200030015a8c016d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f69642c20706c616e5f686173682c207472616e73616374696f6e5f66696e6765727072696e745f696429292c20383a3a3a494e543829680070007800800100880100980100425f0a15696e6465785f7265636f6d6d656e646174696f6e73100c1a1d080f100018003000380750f1075a0c080710001800300050196000600020002a1241525241595b5d3a3a3a535452494e475b5d3000680070007800800100880100980100480d52bd040a077072696d617279100118012268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f69642209706c616e5f6861736822086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a04706c616e2a15696e6465785f7265636f6d6d656e646174696f6e73300b30013002300330043005300640004000400040004000400040004a10080010001a00200028003000380040005a00700770087009700a700c7a0408002000800100880100900104980101a201c70108011268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f69642209706c616e5f68617368221a7472616e73616374696f6e5f66696e6765727072696e745f6964a80100b20100ba0100c00100c80100d00101e001005a9d010a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f696430023003380b3801380438053806400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201b9020abc01637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e543829126e636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381800280b300038014002b201a9020a077072696d61727910001a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a1a7472616e73616374696f6e5f66696e6765727072696e745f69641a09706c616e5f686173681a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a04706c616e1a15696e6465785f7265636f6d6d656e646174696f6e73200b200120022003200420052006200720082009200a200c2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89b38a89","value":"030ae60c0a167472616e73616374696f6e5f73746174697374696373182b200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510031a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410041a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10051a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110061a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310071a0d081210001800300050da1d60002000300068007000780080010088010098010042cf010a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3810081a0c080110201800300050176000200030015a656d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f696429292c20383a3a3a494e543829680070007800800100880100980100480952fb020a077072696d617279100118012243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f696422086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a7374617469737469637330083001300230033004400040004000400040004a10080010001a00200028003000380040005a007005700670077a0408002000800100880100900104980101a2017b08011243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f6964a80100b20100ba0100c00100c80100d00101e001005a7b0a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f69643002380838013803380440004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201ef010a9701637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e5438291249636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3818002808300038014002b201b8010a077072696d61727910001a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a73746174697374696373200820012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89b48a89","value":"030ae4030a1664617461626173655f726f6c655f73657474696e6773182c200128013a0042300a0b64617461626173655f696410011a0c080c100018003000501a600020003000680070007800800100880100980100422e0a09726f6c655f6e616d6510021a0c08071000180030005019600020003000680070007800800100880100980100423e0a0873657474696e677310031a1d080f100018003000380750f1075a0c0807100018003000501960006000200030006800700078008001008801009801004804527d0a077072696d61727910011801220b64617461626173655f69642209726f6c655f6e616d652a0873657474696e677330013002400040004a10080010001a00200028003000380040005a0070037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201350a077072696d61727910001a0b64617461626173655f69641a09726f6c655f6e616d651a0873657474696e67732001200220032803b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b58a89","value":"030a840a0a0c74656e616e745f7573616765182d200128013a00422e0a0974656e616e745f696410011a0c0801104018003000501460002000300068007000780080010088010098010042300a0b696e7374616e63655f696410021a0c0801104018003000501460002000300068007000780080010088010098010042350a106e6578745f696e7374616e63655f696410031a0c0801104018003000501460002000300068007000780080010088010098010042310a0b6c6173745f75706461746510041a0d080510001800300050da0860002000300068007000780080010088010098010042340a0e72755f62757273745f6c696d697410051a0d080210401800300050bd0560002001300068007000780080010088010098010042340a0e72755f726566696c6c5f7261746510061a0d080210401800300050bd0560002001300068007000780080010088010098010042300a0a72755f63757272656e7410071a0d080210401800300050bd0560002001300068007000780080010088010098010042370a1163757272656e745f73686172655f73756d10081a0d080210401800300050bd0560002001300068007000780080010088010098010042360a11746f74616c5f636f6e73756d7074696f6e10091a0c0808100018003000501160002001300068007000780080010088010098010042330a0e696e7374616e63655f6c65617365100a1a0c0808100018003000501160002001300068007000780080010088010098010042310a0c696e7374616e63655f736571100b1a0c0801104018003000501460002001300068007000780080010088010098010042350a0f696e7374616e63655f736861726573100c1a0d080210401800300050bd05600020013000680070007800800100880100980100480d52a5020a077072696d61727910011801220974656e616e745f6964220b696e7374616e63655f69642a106e6578745f696e7374616e63655f69642a0b6c6173745f7570646174652a0e72755f62757273745f6c696d69742a0e72755f726566696c6c5f726174652a0a72755f63757272656e742a1163757272656e745f73686172655f73756d2a11746f74616c5f636f6e73756d7074696f6e2a0e696e7374616e63655f6c656173652a0c696e7374616e63655f7365712a0f696e7374616e63655f73686172657330013002400040004a10080010001a00200028003000380040005a007003700470057006700770087009700a700b700c7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201dd010a077072696d61727910001a0974656e616e745f69641a0b696e7374616e63655f69641a106e6578745f696e7374616e63655f69641a0b6c6173745f7570646174651a0e72755f62757273745f6c696d69741a0e72755f726566696c6c5f726174651a0a72755f63757272656e741a1163757272656e745f73686172655f73756d1a11746f74616c5f636f6e73756d7074696f6e1a0e696e7374616e63655f6c656173651a0c696e7374616e63655f7365711a0f696e7374616e63655f736861726573200120022003200420052006200720082009200a200b200c2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b68a89","value":"030aec030a0d73716c5f696e7374616e636573182e200128013a0042270a02696410011a0c0801104018003000501460002000300068007000780080010088010098010042290a046164647210021a0c08071000180030005019600020013000680070007800800100880100980100422f0a0a73657373696f6e5f696410031a0c08081000180030005011600020013000680070007800800100880100980100422e0a086c6f63616c69747910041a0d081210001800300050da1d6000200130006800700078008001008801009801004805527b0a077072696d61727910011801220269642a04616464722a0a73657373696f6e5f69642a086c6f63616c697479300140004a10080010001a00200028003000380040005a007002700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201350a077072696d61727910001a0269641a04616464721a0a73657373696f6e5f69641a086c6f63616c69747920012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b78a89","value":"030aee030a137370616e5f636f6e66696775726174696f6e73182f200128013a00422e0a0973746172745f6b657910011a0c08081000180030005011600020003000680070007800800100880100980100422c0a07656e645f6b657910021a0c08081000180030005011600020003000680070007800800100880100980100422b0a06636f6e66696710031a0c08081000180030005011600020003000680070007800800100880100980100480452750a077072696d61727910011801220973746172745f6b65792a07656e645f6b65792a06636f6e666967300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100a2012f0a1373746172745f6b6579203c20656e645f6b6579120c636865636b5f626f756e6473180028012802300038004002b2012f0a077072696d61727910001a0973746172745f6b65791a07656e645f6b65791a06636f6e6669672001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89b88a89","value":"030abe020a0b726f6c655f69645f7365711830200128013a00422a0a0576616c756510011a0c080110401800300050146000200030006800700078008001008801009801004800525c0a077072696d61727910011800220576616c7565300140004a10080010001a00200028003000380040005a007a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060006a250a0d0a0561646d696e10a00618a0060a0c0a04726f6f7410a00618a00612046e6f64651802800100880103980100b201160a077072696d61727910001a0576616c756520012801b80100c20100e201180801106418ffffffff072064280032040800100038014200e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880300a80300b00300"} -,{"key":"8b89ba8a89","value":"030ad7050a0f74656e616e745f73657474696e67731832200128013a00422e0a0974656e616e745f696410011a0c0801104018003000501460002000300068007000780080010088010098010042290a046e616d6510021a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510031a0c0807100018003000501960002000300068007000780080010088010098010042450a0c6c6173745f7570646174656410041a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422f0a0a76616c75655f7479706510051a0c08071000180030005019600020003000680070007800800100880100980100422b0a06726561736f6e10061a0c080710001800300050196000200130006800700078008001008801009801004807529b010a077072696d61727910011801220974656e616e745f696422046e616d652a0576616c75652a0c6c6173745f757064617465642a0a76616c75655f747970652a06726561736f6e30013002400040004a10080010001a00200028003000380040005a0070037004700570067a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b20185010a3966616d5f305f74656e616e745f69645f6e616d655f76616c75655f6c6173745f757064617465645f76616c75655f747970655f726561736f6e10001a0974656e616e745f69641a046e616d651a0576616c75651a0c6c6173745f757064617465641a0a76616c75655f747970651a06726561736f6e2001200220032004200520062800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89bb8a89","value":"030aae040a0a70726976696c656765731833200128013a00422d0a08757365726e616d6510011a0c0807100018003000501960002000300068007000780080010088010098010042290a047061746810021a0c0807100018003000501960002000300068007000780080010088010098010042400a0a70726976696c6567657310031a1d080f100018003000380750f1075a0c08071000180030005019600060002000300068007000780080010088010098010042430a0d6772616e745f6f7074696f6e7310041a1d080f100018003000380750f1075a0c08071000180030005019600060002000300068007000780080010088010098010048055288010a077072696d617279100118012208757365726e616d652204706174682a0a70726976696c656765732a0d6772616e745f6f7074696f6e7330013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201400a077072696d61727910001a08757365726e616d651a04706174681a0a70726976696c656765731a0d6772616e745f6f7074696f6e7320012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89bc8a89","value":"030afa050a1465787465726e616c5f636f6e6e656374696f6e731834200128013a0042340a0f636f6e6e656374696f6e5f6e616d6510011a0c0807100018003000501960002000300068007000780080010088010098010042400a076372656174656410021a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d50300068007000780080010088010098010042400a077570646174656410031a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d50300068007000780080010088010098010042340a0f636f6e6e656374696f6e5f7479706510041a0c0807100018003000501960002000300068007000780080010088010098010042370a12636f6e6e656374696f6e5f64657461696c7310051a0c08081000180030005011600020003000680070007800800100880100980100422a0a056f776e657210061a0c08071000180030005019600020003000680070007800800100880100980100480752ae010a077072696d61727910011801220f636f6e6e656374696f6e5f6e616d652a07637265617465642a07757064617465642a0f636f6e6e656374696f6e5f747970652a12636f6e6e656374696f6e5f64657461696c732a056f776e6572300140004a10080010001a00200028003000380040005a00700270037004700570067a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201680a077072696d61727910001a0f636f6e6e656374696f6e5f6e616d651a07637265617465641a07757064617465641a0f636f6e6e656374696f6e5f747970651a12636f6e6e656374696f6e5f64657461696c731a056f776e65722001200220032004200520062800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8c"} -,{"key":"8d"} -,{"key":"8d89888a89","value":"03108080804018808080800222040890bf052803500058007801"} -,{"key":"8d89898a89","value":"03108080804018808080800222040890bf052805500058007801"} -,{"key":"8d89988a89","value":"031080808040188080808002220308901c2805500058007801"} -,{"key":"8d89998a89","value":"03108080804018808080800222040890bf052805500058007801"} -,{"key":"8d899e8a89","value":"031080808040188080808002220308d8042805500058007801"} -,{"key":"8d89a18a89","value":"03220308d804500058007800"} -,{"key":"8d89a38a89","value":"03220308d804500058007800"} -,{"key":"8d89b58a89","value":"03220308a038500058007800"} -,{"key":"8e"} -,{"key":"90"} -,{"key":"93"} -,{"key":"94"} -,{"key":"95"} -,{"key":"96"} -,{"key":"97"} -,{"key":"98"} -,{"key":"99"} -,{"key":"9a"} -,{"key":"9b"} -,{"key":"9c"} -,{"key":"9d"} -,{"key":"9e"} -,{"key":"9f"} -,{"key":"a0"} -,{"key":"a1"} -,{"key":"a2"} -,{"key":"a3"} -,{"key":"a4"} -,{"key":"a5"} -,{"key":"a6"} -,{"key":"a68988881273797374656d00018c89","value":"0102"} -,{"key":"a6898988127075626c696300018c89","value":"013a"} -,{"key":"a68989a512636f6d6d656e747300018c89","value":"0130"} -,{"key":"a68989a51264617461626173655f726f6c655f73657474696e677300018c89","value":"0158"} -,{"key":"a68989a51264657363726970746f7200018c89","value":"0106"} -,{"key":"a68989a5126576656e746c6f6700018c89","value":"0118"} -,{"key":"a68989a51265787465726e616c5f636f6e6e656374696f6e7300018c89","value":"0168"} -,{"key":"a68989a5126a6f627300018c89","value":"011e"} -,{"key":"a68989a5126a6f696e5f746f6b656e7300018c89","value":"0152"} -,{"key":"a68989a5126c6561736500018c89","value":"0116"} -,{"key":"a68989a5126c6f636174696f6e7300018c89","value":"012a"} -,{"key":"a68989a5126d6967726174696f6e7300018c89","value":"0150"} -,{"key":"a68989a5126e616d65737061636500018c89","value":"013c"} -,{"key":"a68989a51270726976696c6567657300018c89","value":"0166"} -,{"key":"a68989a51270726f7465637465645f74735f6d65746100018c89","value":"013e"} -,{"key":"a68989a51270726f7465637465645f74735f7265636f72647300018c89","value":"0140"} -,{"key":"a68989a51272616e67656c6f6700018c89","value":"011a"} -,{"key":"a68989a5127265706c69636174696f6e5f636f6e73747261696e745f737461747300018c89","value":"0132"} -,{"key":"a68989a5127265706c69636174696f6e5f637269746963616c5f6c6f63616c697469657300018c89","value":"0134"} -,{"key":"a68989a5127265706c69636174696f6e5f737461747300018c89","value":"0136"} -,{"key":"a68989a5127265706f7274735f6d65746100018c89","value":"0138"} -,{"key":"a68989a512726f6c655f69645f73657100018c89","value":"0160"} -,{"key":"a68989a512726f6c655f6d656d6265727300018c89","value":"012e"} -,{"key":"a68989a512726f6c655f6f7074696f6e7300018c89","value":"0142"} -,{"key":"a68989a5127363686564756c65645f6a6f627300018c89","value":"014a"} -,{"key":"a68989a51273657474696e677300018c89","value":"010c"} -,{"key":"a68989a5127370616e5f636f6e66696775726174696f6e7300018c89","value":"015e"} -,{"key":"a68989a51273716c5f696e7374616e63657300018c89","value":"015c"} -,{"key":"a68989a51273716c6c6976656e65737300018c89","value":"014e"} -,{"key":"a68989a51273746174656d656e745f62756e646c655f6368756e6b7300018c89","value":"0144"} -,{"key":"a68989a51273746174656d656e745f646961676e6f737469637300018c89","value":"0148"} -,{"key":"a68989a51273746174656d656e745f646961676e6f73746963735f726571756573747300018c89","value":"0146"} -,{"key":"a68989a51273746174656d656e745f7374617469737469637300018c89","value":"0154"} -,{"key":"a68989a5127461626c655f7374617469737469637300018c89","value":"0128"} -,{"key":"a68989a51274656e616e745f73657474696e677300018c89","value":"0164"} -,{"key":"a68989a51274656e616e745f757361676500018c89","value":"015a"} -,{"key":"a68989a51274656e616e747300018c89","value":"0110"} -,{"key":"a68989a5127472616e73616374696f6e5f7374617469737469637300018c89","value":"0156"} -,{"key":"a68989a512756900018c89","value":"011c"} -,{"key":"a68989a512757365727300018c89","value":"0108"} -,{"key":"a68989a5127765625f73657373696f6e7300018c89","value":"0126"} -,{"key":"a68989a5127a6f6e657300018c89","value":"010a"} -,{"key":"a7"} -,{"key":"a8"} -,{"key":"a9"} -,{"key":"aa"} -,{"key":"ab"} -,{"key":"ac"} -,{"key":"ad"} -,{"key":"ae"} -,{"key":"af"} -,{"key":"b0"} -,{"key":"b1"} -,{"key":"b2"} -,{"key":"b3"} -,{"key":"b4"} -,{"key":"b5"} -,{"key":"b6"} -,{"key":"b7"} -,{"key":"b8"} -,{"key":"b8898888","value":"01c801"} -,{"key":"ba"} -,{"key":"bb"} -,{"key":"bc"} -]` - // system222SHA256 is the SHA-256 hash of the above constant. - system222SHA256 = `0506810275ba02ff24b8a067e07570b983f69f4a67785ccc8b0ec9be39c68bc1` - - // nonSystem222 is the hard-coded string representation of the - // initial values for a non-system tenant as produced by the 22.2 - // release binary. - // - // This string literal was generated by copying over the expected results - // for the TestInitialValuesToString test in the release-22.2 branch. - nonSystem222 = `[{"key":""} -,{"key":"8b89898a89","value":"0312390a0673797374656d10011a250a0d0a0561646d696e1080101880100a0c0a04726f6f7410801018801012046e6f646518022200280140004a00"} -,{"key":"8b898b8a89","value":"030afb020a0a64657363726970746f721803200128013a0042270a02696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a64657363726970746f7210021a0c08081000180030005011600020013000680070007800800100880100980100480352670a077072696d61727910011801220269642a0a64657363726970746f72300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b201130a077072696d61727910001a02696420012800b201240a1066616d5f325f64657363726970746f7210021a0a64657363726970746f7220022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b898c8a89","value":"030aaa050a0575736572731804200128013a00422d0a08757365726e616d6510011a0c0807100018003000501960002000300068007000780080010088010098010042330a0e68617368656450617373776f726410021a0c0808100018003000501160002001300068007000780080010088010098010042320a066973526f6c6510031a0c08001000180030005010600020002a0566616c73653000680070007800800100880100980100422c0a07757365725f696410041a0c080c100018003000501a60002000300068007000780080010088010098010048055286010a077072696d617279100118012208757365726e616d652a0e68617368656450617373776f72642a066973526f6c652a07757365725f6964300140004a10080010001a00200028003000380040005a007002700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00102e001005a6a0a1175736572735f757365725f69645f696478100218012207757365725f69643004380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201240a077072696d61727910001a08757365726e616d651a07757365725f6964200120042804b2012c0a1466616d5f325f68617368656450617373776f726410021a0e68617368656450617373776f726420022802b2011c0a0c66616d5f335f6973526f6c6510031a066973526f6c6520032803b80104c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b898d8a89","value":"030aea020a057a6f6e65731805200128013a0042270a02696410011a0c08011040180030005014600020003000680070007800800100880100980100422b0a06636f6e66696710021a0c08081000180030005011600020013000680070007800800100880100980100480352630a077072696d61727910011801220269642a06636f6e666967300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201130a077072696d61727910001a02696420012800b2011c0a0c66616d5f325f636f6e66696710021a06636f6e66696720022802b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b898e8a89","value":"030aa9040a0873657474696e67731806200128013a0042290a046e616d6510011a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510021a0c0807100018003000501960002000300068007000780080010088010098010042440a0b6c6173745570646174656410031a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422e0a0976616c75655479706510041a0c0807100018003000501960002001300068007000780080010088010098010048055280010a077072696d6172791001180122046e616d652a0576616c75652a0b6c617374557064617465642a0976616c756554797065300140004a10080010001a00200028003000380040005a007002700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201590a2666616d5f305f6e616d655f76616c75655f6c617374557064617465645f76616c75655479706510001a046e616d651a0576616c75651a0b6c617374557064617465641a0976616c75655479706520012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b898f8a89","value":"030ac4020a1164657363726970746f725f69645f7365711807200128013a00422a0a0576616c756510011a0c080110401800300050146000200030006800700078008001008801009801004800525c0a077072696d61727910011800220576616c7565300140004a10080010001a00200028003000380040005a007a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060006a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800100880103980100b201160a077072696d61727910001a0576616c756520012801b80100c20100e2011c0801100118ffffffffffffffff7f2001280032040800100038014200e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880300a80300b00300"} -,{"key":"8b89938a89","value":"030afa030a056c65617365180b200128013a00422b0a0664657363494410011a0c08011040180030005014600020003000680070007800800100880100980100422c0a0776657273696f6e10021a0c08011040180030005014600020003000680070007800800100880100980100422b0a066e6f6465494410031a0c0801104018003000501460002000300068007000780080010088010098010042300a0a65787069726174696f6e10041a0d080510001800300050da0860002000300068007000780080010088010098010048055286010a077072696d617279100118012206646573634944220776657273696f6e220a65787069726174696f6e22066e6f64654944300130023004300340004000400040004a10080010001a00200028003000380040005a007a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2013a0a077072696d61727910001a066465736349441a0776657273696f6e1a066e6f646549441a0a65787069726174696f6e20012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89948a89","value":"030afa050a086576656e746c6f67180c200128013a00422f0a0974696d657374616d7010011a0d080510001800300050da08600020003000680070007800800100880100980100422e0a096576656e745479706510021a0c08071000180030005019600020003000680070007800800100880100980100422d0a08746172676574494410031a0c0801104018003000501460002000300068007000780080010088010098010042300a0b7265706f7274696e67494410041a0c0801104018003000501460002000300068007000780080010088010098010042290a04696e666f10051a0c0807100018003000501960002001300068007000780080010088010098010042380a08756e69717565494410061a0c08081000180030005011600020002a09757569645f7634282930006800700078008001008801009801004807529e010a077072696d61727910011801220974696d657374616d702208756e6971756549442a096576656e74547970652a0874617267657449442a0b7265706f7274696e6749442a04696e666f30013006400040004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201260a077072696d61727910001a0974696d657374616d701a08756e697175654944200120062800b201220a0f66616d5f325f6576656e745479706510021a096576656e745479706520022802b201200a0e66616d5f335f746172676574494410031a08746172676574494420032803b201260a1166616d5f345f7265706f7274696e67494410041a0b7265706f7274696e67494420042804b201180a0a66616d5f355f696e666f10051a04696e666f20052805b80106c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89958a89","value":"030ad9060a0872616e67656c6f67180d200128013a00422f0a0974696d657374616d7010011a0d080510001800300050da08600020003000680070007800800100880100980100422c0a0772616e6765494410021a0c08011040180030005014600020003000680070007800800100880100980100422c0a0773746f7265494410031a0c08011040180030005014600020003000680070007800800100880100980100422e0a096576656e745479706510041a0c0807100018003000501960002000300068007000780080010088010098010042310a0c6f7468657252616e6765494410051a0c0801104018003000501460002001300068007000780080010088010098010042290a04696e666f10061a0c08071000180030005019600020013000680070007800800100880100980100423d0a08756e69717565494410071a0c08011040180030005014600020002a0e756e697175655f726f77696428293000680070007800800100880100980100480852a9010a077072696d61727910011801220974696d657374616d702208756e6971756549442a0772616e676549442a0773746f726549442a096576656e74547970652a0c6f7468657252616e676549442a04696e666f30013007400040004a10080010001a00200028003000380040005a00700270037004700570067a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201260a077072696d61727910001a0974696d657374616d701a08756e697175654944200120072800b2011e0a0d66616d5f325f72616e6765494410021a0772616e6765494420022802b2011e0a0d66616d5f335f73746f7265494410031a0773746f7265494420032803b201220a0f66616d5f345f6576656e745479706510041a096576656e745479706520042804b201280a1266616d5f355f6f7468657252616e6765494410051a0c6f7468657252616e6765494420052805b201180a0a66616d5f365f696e666f10061a04696e666f20062806b80107c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89968a89","value":"030ad1030a027569180e200128013a0042280a036b657910011a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510021a0c0808100018003000501160002001300068007000780080010088010098010042310a0b6c6173745570646174656410031a0d080510001800300050da08600020003000680070007800800100880100980100480452720a077072696d6172791001180122036b65792a0576616c75652a0b6c61737455706461746564300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201140a077072696d61727910001a036b657920012800b2011a0a0b66616d5f325f76616c756510021a0576616c756520022802b201260a1166616d5f335f6c6173745570646174656410031a0b6c6173745570646174656420032803b80104c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89978a89","value":"030ae50d0a046a6f6273180f200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f77696428293000680070007800800100880100980100422b0a0673746174757310021a0c0807100018003000501960002000300068007000780080010088010098010042400a076372656174656410031a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422c0a077061796c6f616410041a0c08081000180030005011600020003000680070007800800100880100980100422d0a0870726f677265737310051a0c0808100018003000501160002001300068007000780080010088010098010042340a0f637265617465645f62795f7479706510061a0c0807100018003000501960002001300068007000780080010088010098010042320a0d637265617465645f62795f696410071a0c0801104018003000501460002001300068007000780080010088010098010042350a10636c61696d5f73657373696f6e5f696410081a0c0808100018003000501160002001300068007000780080010088010098010042360a11636c61696d5f696e7374616e63655f696410091a0c08011040180030005014600020013000680070007800800100880100980100422d0a086e756d5f72756e73100a1a0c08011040180030005014600020013000680070007800800100880100980100422e0a086c6173745f72756e100b1a0d080510001800300050da08600020013000680070007800800100880100980100480c52ea010a077072696d61727910011801220269642a067374617475732a07637265617465642a077061796c6f61642a0870726f67726573732a0f637265617465645f62795f747970652a0d637265617465645f62795f69642a10636c61696d5f73657373696f6e5f69642a11636c61696d5f696e7374616e63655f69642a086e756d5f72756e732a086c6173745f72756e300140004a10080010001a00200028003000380040005a0070027003700470057006700770087009700a700b7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a7c0a176a6f62735f7374617475735f637265617465645f696478100218002206737461747573220763726561746564300230033801400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005aa4010a266a6f62735f637265617465645f62795f747970655f637265617465645f62795f69645f69647810031800220f637265617465645f62795f74797065220d637265617465645f62795f69642a06737461747573300630073801400040004a10080010001a00200028003000380040005a0070027a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005abc020a126a6f62735f72756e5f73746174735f696478100418002210636c61696d5f73657373696f6e5f696422067374617475732207637265617465642a086c6173745f72756e2a086e756d5f72756e732a11636c61696d5f696e7374616e63655f696430083002300338014000400040004a10080010001a00200028003000380040005a00700b700a70097a0408002000800100880100900103980100a20106080012001800a80100b20100ba01810173746174757320494e20282772756e6e696e67273a3a3a535452494e472c2027726576657274696e67273a3a3a535452494e472c202770656e64696e67273a3a3a535452494e472c202770617573652d726571756573746564273a3a3a535452494e472c202763616e63656c2d726571756573746564273a3a3a535452494e4729c00100c80100d00100e0010060056a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2016f0a1f66616d5f305f69645f7374617475735f637265617465645f7061796c6f616410001a0269641a067374617475731a07637265617465641a077061796c6f61641a0f637265617465645f62795f747970651a0d637265617465645f62795f69642001200220032004200620072800b2011a0a0870726f677265737310011a0870726f677265737320052805b2014c0a05636c61696d10021a10636c61696d5f73657373696f6e5f69641a11636c61696d5f696e7374616e63655f69641a086e756d5f72756e731a086c6173745f72756e20082009200a200b2800b80103c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899b8a89","value":"030a8e0b0a0c7765625f73657373696f6e731813200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042310a0c68617368656453656372657410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a08757365726e616d6510031a0c0807100018003000501960002000300068007000780080010088010098010042420a0963726561746564417410041a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422f0a0965787069726573417410051a0d080510001800300050da08600020003000680070007800800100880100980100422f0a097265766f6b6564417410061a0d080510001800300050da0860002001300068007000780080010088010098010042430a0a6c61737455736564417410071a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422e0a096175646974496e666f10081a0c08071000180030005019600020013000680070007800800100880100980100480952b7010a077072696d61727910011801220269642a0c6861736865645365637265742a08757365726e616d652a096372656174656441742a096578706972657341742a097265766f6b656441742a0a6c6173745573656441742a096175646974496e666f300140004a10080010001a00200028003000380040005a0070027003700470057006700770087a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a750a1a7765625f73657373696f6e735f6578706972657341745f6964781002180022096578706972657341743005380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a750a1a7765625f73657373696f6e735f6372656174656441745f6964781003180022096372656174656441743004380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a750a1a7765625f73657373696f6e735f7265766f6b656441745f6964781004180022097265766f6b656441743006380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a770a1b7765625f73657373696f6e735f6c6173745573656441745f69647810051800220a6c6173745573656441743007380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060066a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201bb010a5166616d5f305f69645f6861736865645365637265745f757365726e616d655f6372656174656441745f6578706972657341745f7265766f6b656441745f6c6173745573656441745f6175646974496e666f10001a0269641a0c6861736865645365637265741a08757365726e616d651a096372656174656441741a096578706972657341741a097265766f6b656441741a0a6c6173745573656441741a096175646974496e666f200120022003200420052006200720082800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899c8a89","value":"030adb080a107461626c655f737461746973746963731814200128013a00422c0a077461626c65494410011a0c0801104018003000501460002000300068007000780080010088010098010042400a0b737461746973746963494410021a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042290a046e616d6510031a0c08071000180030005019600020013000680070007800800100880100980100423f0a09636f6c756d6e49447310041a1d080f104018003000380150f8075a0c08011040180030005014600060002000300068007000780080010088010098010042420a0963726561746564417410051a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d503000680070007800800100880100980100422d0a08726f77436f756e7410061a0c0801104018003000501460002000300068007000780080010088010098010042320a0d64697374696e6374436f756e7410071a0c08011040180030005014600020003000680070007800800100880100980100422e0a096e756c6c436f756e7410081a0c08011040180030005014600020003000680070007800800100880100980100422e0a09686973746f6772616d10091a0c0808100018003000501160002001300068007000780080010088010098010042360a0761766753697a65100a1a0c08011040180030005014600020002a08303a3a3a494e54383000680070007800800100880100980100480b52d3010a077072696d6172791001180122077461626c654944220b73746174697374696349442a046e616d652a09636f6c756d6e4944732a096372656174656441742a08726f77436f756e742a0d64697374696e6374436f756e742a096e756c6c436f756e742a09686973746f6772616d2a0761766753697a6530013002400040004a10080010001a00200028003000380040005a007003700470057006700770087009700a7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201e1010a5d66616d5f305f7461626c6549445f73746174697374696349445f6e616d655f636f6c756d6e4944735f6372656174656441745f726f77436f756e745f64697374696e6374436f756e745f6e756c6c436f756e745f686973746f6772616d10001a077461626c6549441a0b73746174697374696349441a046e616d651a09636f6c756d6e4944731a096372656174656441741a08726f77436f756e741a0d64697374696e6374436f756e741a096e756c6c436f756e741a09686973746f6772616d1a0761766753697a65200120022003200420052006200720082009200a2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899d8a89","value":"030aca040a096c6f636174696f6e731815200128013a0042300a0b6c6f63616c6974794b657910011a0c0807100018003000501960002000300068007000780080010088010098010042320a0d6c6f63616c69747956616c756510021a0c08071000180030005019600020003000680070007800800100880100980100422e0a086c6174697475646510031a0d0803100f1812300050a40d600020003000680070007800800100880100980100422f0a096c6f6e67697475646510041a0d0803100f1812300050a40d6000200030006800700078008001008801009801004805528e010a077072696d61727910011801220b6c6f63616c6974794b6579220d6c6f63616c69747956616c75652a086c617469747564652a096c6f6e67697475646530013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201710a3266616d5f305f6c6f63616c6974794b65795f6c6f63616c69747956616c75655f6c617469747564655f6c6f6e67697475646510001a0b6c6f63616c6974794b65791a0d6c6f63616c69747956616c75651a086c617469747564651a096c6f6e67697475646520012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b899f8a89","value":"030a9c050a0c726f6c655f6d656d626572731817200128013a0042290a04726f6c6510011a0c08071000180030005019600020003000680070007800800100880100980100422b0a066d656d62657210021a0c08071000180030005019600020003000680070007800800100880100980100422c0a07697341646d696e10031a0c08001000180030005010600020003000680070007800800100880100980100480452720a077072696d617279100118012204726f6c6522066d656d6265722a07697341646d696e30013002400040004a10080010001a00200028003000380040005a0070037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a6b0a15726f6c655f6d656d626572735f726f6c655f696478100218002204726f6c653001380240004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e001005a6f0a17726f6c655f6d656d626572735f6d656d6265725f6964781003180022066d656d6265723002380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060046a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2011f0a077072696d61727910001a04726f6c651a066d656d626572200120022800b2011e0a0d66616d5f335f697341646d696e10031a07697341646d696e20032803b80104c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a08a89","value":"030a95040a08636f6d6d656e74731818200128013a0042290a047479706510011a0c08011040180030005014600020003000680070007800800100880100980100422e0a096f626a6563745f696410021a0c08011040180030005014600020003000680070007800800100880100980100422b0a067375625f696410031a0c08011040180030005014600020003000680070007800800100880100980100422c0a07636f6d6d656e7410041a0c0807100018003000501960002000300068007000780080010088010098010048055281010a077072696d6172791001180122047479706522096f626a6563745f696422067375625f69642a07636f6d6d656e743001300230034000400040004a10080010001a00200028003000380040005a0070047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a330a0d0a0561646d696e10e00318e0030a0c0a067075626c6963102018000a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012c0a077072696d61727910001a04747970651a096f626a6563745f69641a067375625f69642001200220032800b2011e0a0d66616d5f345f636f6d6d656e7410041a07636f6d6d656e7420042804b80105c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a18a89","value":"030a90060a1c7265706c69636174696f6e5f636f6e73747261696e745f73746174731819200128013a00422c0a077a6f6e655f696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a7375627a6f6e655f696410021a0c0801104018003000501460002000300068007000780080010088010098010042290a047479706510031a0c08071000180030005019600020003000680070007800800100880100980100422b0a06636f6e66696710041a0c08071000180030005019600020003000680070007800800100880100980100422e0a097265706f72745f696410051a0c0801104018003000501460002000300068007000780080010088010098010042350a0f76696f6c6174696f6e5f737461727410061a0d080910001800300050a00960002001300068007000780080010088010098010042350a1076696f6c6174696e675f72616e67657310071a0c08011040180030005014600020003000680070007800800100880100980100480852b8010a077072696d6172791001180122077a6f6e655f6964220a7375627a6f6e655f69642204747970652206636f6e6669672a097265706f72745f69642a0f76696f6c6174696f6e5f73746172742a1076696f6c6174696e675f72616e676573300130023003300440004000400040004a10080010001a00200028003000380040005a007005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2016c0a077072696d61727910001a077a6f6e655f69641a0a7375627a6f6e655f69641a04747970651a06636f6e6669671a097265706f72745f69641a0f76696f6c6174696f6e5f73746172741a1076696f6c6174696e675f72616e67657320012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a28a89","value":"030af9040a1f7265706c69636174696f6e5f637269746963616c5f6c6f63616c6974696573181a200128013a00422c0a077a6f6e655f696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a7375627a6f6e655f696410021a0c08011040180030005014600020003000680070007800800100880100980100422d0a086c6f63616c69747910031a0c08071000180030005019600020003000680070007800800100880100980100422e0a097265706f72745f696410041a0c0801104018003000501460002000300068007000780080010088010098010042330a0e61745f7269736b5f72616e67657310051a0c080110401800300050146000200030006800700078008001008801009801004806529b010a077072696d6172791001180122077a6f6e655f6964220a7375627a6f6e655f696422086c6f63616c6974792a097265706f72745f69642a0e61745f7269736b5f72616e6765733001300230034000400040004a10080010001a00200028003000380040005a00700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201510a077072696d61727910001a077a6f6e655f69641a0a7375627a6f6e655f69641a086c6f63616c6974791a097265706f72745f69641a0e61745f7269736b5f72616e676573200120022003200420052800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a38a89","value":"030ae7060a117265706c69636174696f6e5f7374617473181b200128013a00422c0a077a6f6e655f696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0a7375627a6f6e655f696410021a0c08011040180030005014600020003000680070007800800100880100980100422e0a097265706f72745f696410031a0c0801104018003000501460002000300068007000780080010088010098010042310a0c746f74616c5f72616e67657310041a0c0801104018003000501460002000300068007000780080010088010098010042370a12756e617661696c61626c655f72616e67657310051a0c08011040180030005014600020003000680070007800800100880100980100423c0a17756e6465725f7265706c6963617465645f72616e67657310061a0c08011040180030005014600020003000680070007800800100880100980100423b0a166f7665725f7265706c6963617465645f72616e67657310071a0c08011040180030005014600020003000680070007800800100880100980100480852d6010a077072696d6172791001180122077a6f6e655f6964220a7375627a6f6e655f69642a097265706f72745f69642a0c746f74616c5f72616e6765732a12756e617661696c61626c655f72616e6765732a17756e6465725f7265706c6963617465645f72616e6765732a166f7665725f7265706c6963617465645f72616e67657330013002400040004a10080010001a00200028003000380040005a00700370047005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2018e010a077072696d61727910001a077a6f6e655f69641a0a7375627a6f6e655f69641a097265706f72745f69641a0c746f74616c5f72616e6765731a12756e617661696c61626c655f72616e6765731a17756e6465725f7265706c6963617465645f72616e6765731a166f7665725f7265706c6963617465645f72616e67657320012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a48a89","value":"030ae6020a0c7265706f7274735f6d657461181c200128013a0042270a02696410011a0c08011040180030005014600020003000680070007800800100880100980100422f0a0967656e65726174656410021a0d080910001800300050a009600020003000680070007800800100880100980100480352660a077072696d61727910011801220269642a0967656e657261746564300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201200a077072696d61727910001a0269641a0967656e657261746564200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a68a89","value":"030a85040a096e616d657370616365181e200128013a00422d0a08706172656e74494410011a0c0801104018003000501460002000300068007000780080010088010098010042330a0e706172656e74536368656d61494410021a0c0801104018003000501460002000300068007000780080010088010098010042290a046e616d6510031a0c0807100018003000501960002000300068007000780080010088010098010042270a02696410041a0c0801104018003000501460002001300068007000780080010088010098010048055283010a077072696d617279100118012208706172656e744944220e706172656e74536368656d61494422046e616d652a0269643001300230034000400040004a10080010001a00200028003000380040005a0070047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b201330a077072696d61727910001a08706172656e7449441a0e706172656e74536368656d6149441a046e616d652001200220032800b201140a0866616d5f345f696410041a02696420042804b80105c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a78a89","value":"030a8f050a1170726f7465637465645f74735f6d657461181f200128013a0042340a0973696e676c65746f6e10011a0c08001000180030005010600020002a04747275653000680070007800800100880100980100422c0a0776657273696f6e10021a0c0801104018003000501460002000300068007000780080010088010098010042300a0b6e756d5f7265636f72647310031a0c08011040180030005014600020003000680070007800800100880100980100422e0a096e756d5f7370616e7310041a0c0801104018003000501460002000300068007000780080010088010098010042300a0b746f74616c5f627974657310051a0c0801104018003000501460002000300068007000780080010088010098010048065296010a077072696d61727910011801220973696e676c65746f6e2a0776657273696f6e2a0b6e756d5f7265636f7264732a096e756d5f7370616e732a0b746f74616c5f6279746573300140004a10080010001a00200028003000380040005a0070027003700470057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201260a0973696e676c65746f6e120f636865636b5f73696e676c65746f6e18002801300038004002b201500a077072696d61727910001a0973696e676c65746f6e1a0776657273696f6e1a0b6e756d5f7265636f7264731a096e756d5f7370616e731a0b746f74616c5f6279746573200120022003200420052800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89a88a89","value":"030af3050a1470726f7465637465645f74735f7265636f7264731820200128013a0042280a02696410011a0d080e10001800300050861760002000300068007000780080010088010098010042280a02747310021a0d080310001800300050a40d600020003000680070007800800100880100980100422e0a096d6574615f7479706510031a0c0807100018003000501960002000300068007000780080010088010098010042290a046d65746110041a0c08081000180030005011600020013000680070007800800100880100980100422e0a096e756d5f7370616e7310051a0c08011040180030005014600020003000680070007800800100880100980100422a0a057370616e7310061a0c0808100018003000501160002000300068007000780080010088010098010042340a08766572696669656410071a0c08001000180030005010600020002a0566616c73653000680070007800800100880100980100422b0a0674617267657410081a0c08081000180030005011600020013000680070007800800100880100980100480952a0010a077072696d61727910011801220269642a0274732a096d6574615f747970652a046d6574612a096e756d5f7370616e732a057370616e732a0876657269666965642a06746172676574300140004a10080010001a00200028003000380040005a0070027003700470057006700770087a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100b2015a0a077072696d61727910001a0269641a0274731a096d6574615f747970651a046d6574611a096e756d5f7370616e731a057370616e731a0876657269666965641a06746172676574200120022003200420052006200720082800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89a98a89","value":"030ae0040a0c726f6c655f6f7074696f6e731821200128013a00422d0a08757365726e616d6510011a0c08071000180030005019600020003000680070007800800100880100980100422b0a066f7074696f6e10021a0c08071000180030005019600020003000680070007800800100880100980100422a0a0576616c756510031a0c08071000180030005019600020013000680070007800800100880100980100422c0a07757365725f696410041a0c080c100018003000501a6000200030006800700078008001008801009801004805527f0a077072696d617279100118012208757365726e616d6522066f7074696f6e2a0576616c75652a07757365725f696430013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a6c0a1175736572735f757365725f69645f696478100218002207757365725f696430043801380240004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201370a077072696d61727910001a08757365726e616d651a066f7074696f6e1a0576616c75651a07757365725f696420012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89aa8a89","value":"030ac1030a1773746174656d656e745f62756e646c655f6368756e6b731822200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042300a0b6465736372697074696f6e10021a0c0807100018003000501960002001300068007000780080010088010098010042290a046461746110031a0c08081000180030005011600020003000680070007800800100880100980100480452700a077072696d61727910011801220269642a0b6465736372697074696f6e2a0464617461300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012a0a077072696d61727910001a0269641a0b6465736372697074696f6e1a04646174612001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89ab8a89","value":"030aa60a0a1e73746174656d656e745f646961676e6f73746963735f72657175657374731823200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042350a09636f6d706c6574656410021a0c08001000180030005010600020002a0566616c73653000680070007800800100880100980100423a0a1573746174656d656e745f66696e6765727072696e7410031a0c08071000180030005019600020003000680070007800800100880100980100423d0a1873746174656d656e745f646961676e6f73746963735f696410041a0c0801104018003000501460002001300068007000780080010088010098010042320a0c7265717565737465645f617410051a0d080910001800300050a00960002000300068007000780080010088010098010042410a156d696e5f657865637574696f6e5f6c6174656e637910061a13080610001800300050a20960006a04080010002001300068007000780080010088010098010042300a0a657870697265735f617410071a0d080910001800300050a009600020013000680070007800800100880100980100423a0a1473616d706c696e675f70726f626162696c69747910081a0d080210401800300050bd05600020013000680070007800800100880100980100480952ea010a077072696d61727910011801220269642a09636f6d706c657465642a1573746174656d656e745f66696e6765727072696e742a1873746174656d656e745f646961676e6f73746963735f69642a0c7265717565737465645f61742a156d696e5f657865637574696f6e5f6c6174656e63792a0a657870697265735f61742a1473616d706c696e675f70726f626162696c697479300140004a10080010001a00200028003000380040005a0070027003700470057006700770087a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005ac6010a0d636f6d706c657465645f696478100218002209636f6d706c65746564220269642a1573746174656d656e745f66696e6765727072696e742a156d696e5f657865637574696f6e5f6c6174656e63792a0a657870697265735f61742a1473616d706c696e675f70726f626162696c69747930023001400040004a10080010001a00200028003000380040005a0070037006700770087a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100a201620a3a73616d706c696e675f70726f626162696c697479204245545745454e20302e303a3a3a464c4f41543820414e4420312e303a3a3a464c4f415438121a636865636b5f73616d706c696e675f70726f626162696c69747918002808300038004002b201a4010a077072696d61727910001a0269641a09636f6d706c657465641a1573746174656d656e745f66696e6765727072696e741a1873746174656d656e745f646961676e6f73746963735f69641a0c7265717565737465645f61741a156d696e5f657865637574696f6e5f6c6174656e63791a0a657870697265735f61741a1473616d706c696e675f70726f626162696c697479200120022003200420052006200720082800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89ac8a89","value":"030aa5060a1573746174656d656e745f646961676e6f73746963731824200128013a0042370a02696410011a0c08011040180030005014600020002a0e756e697175655f726f77696428293000680070007800800100880100980100423a0a1573746174656d656e745f66696e6765727072696e7410021a0c08071000180030005019600020003000680070007800800100880100980100422e0a0973746174656d656e7410031a0c0807100018003000501960002000300068007000780080010088010098010042320a0c636f6c6c65637465645f617410041a0d080910001800300050a009600020003000680070007800800100880100980100422b0a05747261636510051a0d081210001800300050da1d60002001300068007000780080010088010098010042430a0d62756e646c655f6368756e6b7310061a1d080f104018003000380150f8075a0c080110401800300050146000600020013000680070007800800100880100980100422a0a056572726f7210071a0c08071000180030005019600020013000680070007800800100880100980100480852b2010a077072696d61727910011801220269642a1573746174656d656e745f66696e6765727072696e742a0973746174656d656e742a0c636f6c6c65637465645f61742a0574726163652a0d62756e646c655f6368756e6b732a056572726f72300140004a10080010001a00200028003000380040005a007002700370047005700670077a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2016c0a077072696d61727910001a0269641a1573746174656d656e745f66696e6765727072696e741a0973746174656d656e741a0c636f6c6c65637465645f61741a0574726163651a0d62756e646c655f6368756e6b731a056572726f7220012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89ad8a89","value":"030ab0090a0e7363686564756c65645f6a6f62731825200128013a0042400a0b7363686564756c655f696410011a0c08011040180030005014600020002a0e756e697175655f726f7769642829300068007000780080010088010098010042320a0d7363686564756c655f6e616d6510021a0c0807100018003000501960002000300068007000780080010088010098010042420a076372656174656410031a0d080910001800300050a009600020002a136e6f7728293a3a3a54494d455354414d50545a3000680070007800800100880100980100422a0a056f776e657210041a0c08071000180030005019600020003000680070007800800100880100980100422e0a086e6578745f72756e10051a0d080910001800300050a00960002001300068007000780080010088010098010042330a0e7363686564756c655f737461746510061a0c0808100018003000501160002001300068007000780080010088010098010042320a0d7363686564756c655f6578707210071a0c0807100018003000501960002001300068007000780080010088010098010042350a107363686564756c655f64657461696c7310081a0c0808100018003000501160002001300068007000780080010088010098010042320a0d6578656375746f725f7479706510091a0c0807100018003000501960002000300068007000780080010088010098010042330a0e657865637574696f6e5f61726773100a1a0c08081000180030005011600020003000680070007800800100880100980100480b52ed010a077072696d61727910011801220b7363686564756c655f69642a0d7363686564756c655f6e616d652a07637265617465642a056f776e65722a086e6578745f72756e2a0e7363686564756c655f73746174652a0d7363686564756c655f657870722a107363686564756c655f64657461696c732a0d6578656375746f725f747970652a0e657865637574696f6e5f61726773300140004a10080010001a00200028003000380040005a0070027003700470057006700770087009700a7a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e001005a660a0c6e6578745f72756e5f6964781002180022086e6578745f72756e3005380140004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201380a05736368656410001a0b7363686564756c655f69641a086e6578745f72756e1a0e7363686564756c655f73746174652001200520062800b201780a056f7468657210011a0d7363686564756c655f6e616d651a07637265617465641a056f776e65721a0d7363686564756c655f657870721a107363686564756c655f64657461696c731a0d6578656375746f725f747970651a0e657865637574696f6e5f61726773200220032004200720082009200a2800b80102c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89af8a89","value":"030a93030a0b73716c6c6976656e6573731827200128013a00422f0a0a73657373696f6e5f696410011a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10021a0d080310001800300050a40d6000200030006800700078008001008801009801004803526f0a077072696d61727910011801220a73657373696f6e5f69642a0a65787069726174696f6e300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2013c0a1a66616d305f73657373696f6e5f69645f65787069726174696f6e10001a0a73657373696f6e5f69641a0a65787069726174696f6e200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b08a89","value":"030ac0040a0a6d6967726174696f6e731828200128013a00422a0a056d616a6f7210011a0c08011040180030005014600020003000680070007800800100880100980100422a0a056d696e6f7210021a0c08011040180030005014600020003000680070007800800100880100980100422a0a05706174636810031a0c08011040180030005014600020003000680070007800800100880100980100422d0a08696e7465726e616c10041a0c0801104018003000501460002000300068007000780080010088010098010042320a0c636f6d706c657465645f617410051a0d080910001800300050a00960002000300068007000780080010088010098010048065290010a077072696d6172791001180122056d616a6f7222056d696e6f72220570617463682208696e7465726e616c2a0c636f6d706c657465645f6174300130023003300440004000400040004a10080010001a00200028003000380040005a0070057a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201440a077072696d61727910001a056d616a6f721a056d696e6f721a0570617463681a08696e7465726e616c1a0c636f6d706c657465645f6174200120022003200420052805b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b18a89","value":"030aaa030a0b6a6f696e5f746f6b656e731829200128013a0042280a02696410011a0d080e100018003000508617600020003000680070007800800100880100980100422b0a0673656372657410021a0c0808100018003000501160002000300068007000780080010088010098010042300a0a65787069726174696f6e10031a0d080910001800300050a009600020003000680070007800800100880100980100480452710a077072696d61727910011801220269642a067365637265742a0a65787069726174696f6e300140004a10080010001a00200028003000380040005a00700270037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b2012b0a077072696d61727910001a0269641a067365637265741a0a65787069726174696f6e2001200220032800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b28a89","value":"030acf120a1473746174656d656e745f73746174697374696373182a200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100423f0a1a7472616e73616374696f6e5f66696e6765727072696e745f696410031a0c08081000180030005011600020003000680070007800800100880100980100422e0a09706c616e5f6861736810041a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510051a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410061a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10071a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110081a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310091a0d081210001800300050da1d600020003000680070007800800100880100980100422a0a04706c616e100a1a0d081210001800300050da1d600020003000680070007800800100880100980100429c020a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38100b1a0c080110201800300050176000200030015a8c016d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f69642c20706c616e5f686173682c207472616e73616374696f6e5f66696e6765727072696e745f696429292c20383a3a3a494e543829680070007800800100880100980100425f0a15696e6465785f7265636f6d6d656e646174696f6e73100c1a1d080f100018003000380750f1075a0c080710001800300050196000600020002a1241525241595b5d3a3a3a535452494e475b5d3000680070007800800100880100980100480d52bd040a077072696d617279100118012268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f69642209706c616e5f6861736822086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a737461746973746963732a04706c616e2a15696e6465785f7265636f6d6d656e646174696f6e73300b30013002300330043005300640004000400040004000400040004a10080010001a00200028003000380040005a00700770087009700a700c7a0408002000800100880100900104980101a201c70108011268637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f69642209706c616e5f68617368221a7472616e73616374696f6e5f66696e6765727072696e745f6964a80100b20100ba0100c00100c80100d00101e001005a9d010a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f6964221a7472616e73616374696f6e5f66696e6765727072696e745f696430023003380b3801380438053806400040004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201b9020abc01637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e543829126e636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381800280b300038014002b201a9020a077072696d61727910001a68637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f706c616e5f686173685f7472616e73616374696f6e5f66696e6765727072696e745f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a1a7472616e73616374696f6e5f66696e6765727072696e745f69641a09706c616e5f686173681a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a737461746973746963731a04706c616e1a15696e6465785f7265636f6d6d656e646174696f6e73200b200120022003200420052006200720082009200a200c2800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89b38a89","value":"030ae60c0a167472616e73616374696f6e5f73746174697374696373182b200128013a0042330a0d616767726567617465645f747310011a0d080910001800300050a00960002000300068007000780080010088010098010042330a0e66696e6765727072696e745f696410021a0c08081000180030005011600020003000680070007800800100880100980100422d0a086170705f6e616d6510031a0c08071000180030005019600020003000680070007800800100880100980100422c0a076e6f64655f696410041a0c0801104018003000501460002000300068007000780080010088010098010042380a0c6167675f696e74657276616c10051a13080610001800300050a20960006a040800100020003000680070007800800100880100980100422e0a086d6574616461746110061a0d081210001800300050da1d60002000300068007000780080010088010098010042300a0a7374617469737469637310071a0d081210001800300050da1d60002000300068007000780080010088010098010042cf010a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3810081a0c080110201800300050176000200030015a656d6f6428666e76333228637264625f696e7465726e616c2e646174756d735f746f5f627974657328616767726567617465645f74732c206170705f6e616d652c2066696e6765727072696e745f69642c206e6f64655f696429292c20383a3a3a494e543829680070007800800100880100980100480952fb020a077072696d617279100118012243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f38220d616767726567617465645f7473220e66696e6765727072696e745f696422086170705f6e616d6522076e6f64655f69642a0c6167675f696e74657276616c2a086d657461646174612a0a7374617469737469637330083001300230033004400040004000400040004a10080010001a00200028003000380040005a007005700670077a0408002000800100880100900104980101a2017b08011243637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381808220d616767726567617465645f747322086170705f6e616d65220e66696e6765727072696e745f696422076e6f64655f6964a80100b20100ba0100c00100c80100d00101e001005a7b0a1566696e6765727072696e745f73746174735f69647810021800220e66696e6765727072696e745f69643002380838013803380440004a10080010001a00200028003000380040005a007a0408002000800100880100900103980100a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060036a210a0b0a0561646d696e102018200a0a0a04726f6f741020182012046e6f64651802800101880103980100a201ef010a9701637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3820494e2028303a3a3a494e54382c20313a3a3a494e54382c20323a3a3a494e54382c20333a3a3a494e54382c20343a3a3a494e54382c20353a3a3a494e54382c20363a3a3a494e54382c20373a3a3a494e5438291249636865636b5f637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f3818002808300038014002b201b8010a077072696d61727910001a43637264625f696e7465726e616c5f616767726567617465645f74735f6170705f6e616d655f66696e6765727072696e745f69645f6e6f64655f69645f73686172645f381a0d616767726567617465645f74731a0e66696e6765727072696e745f69641a086170705f6e616d651a076e6f64655f69641a0c6167675f696e74657276616c1a086d657461646174611a0a73746174697374696373200820012002200320042005200620072800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89b48a89","value":"030ae4030a1664617461626173655f726f6c655f73657474696e6773182c200128013a0042300a0b64617461626173655f696410011a0c080c100018003000501a600020003000680070007800800100880100980100422e0a09726f6c655f6e616d6510021a0c08071000180030005019600020003000680070007800800100880100980100423e0a0873657474696e677310031a1d080f100018003000380750f1075a0c0807100018003000501960006000200030006800700078008001008801009801004804527d0a077072696d61727910011801220b64617461626173655f69642209726f6c655f6e616d652a0873657474696e677330013002400040004a10080010001a00200028003000380040005a0070037a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201350a077072696d61727910001a0b64617461626173655f69641a09726f6c655f6e616d651a0873657474696e67732001200220032803b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b68a89","value":"030aec030a0d73716c5f696e7374616e636573182e200128013a0042270a02696410011a0c0801104018003000501460002000300068007000780080010088010098010042290a046164647210021a0c08071000180030005019600020013000680070007800800100880100980100422f0a0a73657373696f6e5f696410031a0c08081000180030005011600020013000680070007800800100880100980100422e0a086c6f63616c69747910041a0d081210001800300050da1d6000200130006800700078008001008801009801004805527b0a077072696d61727910011801220269642a04616464722a0a73657373696f6e5f69642a086c6f63616c697479300140004a10080010001a00200028003000380040005a007002700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201350a077072696d61727910001a0269641a04616464721a0a73657373696f6e5f69641a086c6f63616c69747920012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89b88a89","value":"030abe020a0b726f6c655f69645f7365711830200128013a00422a0a0576616c756510011a0c080110401800300050146000200030006800700078008001008801009801004800525c0a077072696d61727910011800220576616c7565300140004a10080010001a00200028003000380040005a007a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00100e0010060006a250a0d0a0561646d696e10a00618a0060a0c0a04726f6f7410a00618a00612046e6f64651802800100880103980100b201160a077072696d61727910001a0576616c756520012801b80100c20100e201180801106418ffffffff072064280032040800100038014200e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880300a80300b00300"} -,{"key":"8b89ba8a89","value":"030aa5030a0a7370616e5f636f756e741832200128013a0042340a0973696e676c65746f6e10011a0c08001000180030005010600020002a04747275653000680070007800800100880100980100422f0a0a7370616e5f636f756e7410021a0c080110401800300050146000200030006800700078008001008801009801004803526e0a077072696d61727910011801220973696e676c65746f6e2a0a7370616e5f636f756e74300140004a10080010001a00200028003000380040005a0070027a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100a201210a0973696e676c65746f6e120a73696e676c655f726f7718002801300038004002b201280a077072696d61727910001a0973696e676c65746f6e1a0a7370616e5f636f756e74200120022802b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880303a80300b00300"} -,{"key":"8b89bb8a89","value":"030aae040a0a70726976696c656765731833200128013a00422d0a08757365726e616d6510011a0c0807100018003000501960002000300068007000780080010088010098010042290a047061746810021a0c0807100018003000501960002000300068007000780080010088010098010042400a0a70726976696c6567657310031a1d080f100018003000380750f1075a0c08071000180030005019600060002000300068007000780080010088010098010042430a0d6772616e745f6f7074696f6e7310041a1d080f100018003000380750f1075a0c08071000180030005019600060002000300068007000780080010088010098010048055288010a077072696d617279100118012208757365726e616d652204706174682a0a70726976696c656765732a0d6772616e745f6f7074696f6e7330013002400040004a10080010001a00200028003000380040005a00700370047a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201400a077072696d61727910001a08757365726e616d651a04706174681a0a70726976696c656765731a0d6772616e745f6f7074696f6e7320012002200320042800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8b89bc8a89","value":"030afa050a1465787465726e616c5f636f6e6e656374696f6e731834200128013a0042340a0f636f6e6e656374696f6e5f6e616d6510011a0c0807100018003000501960002000300068007000780080010088010098010042400a076372656174656410021a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d50300068007000780080010088010098010042400a077570646174656410031a0d080510001800300050da08600020002a116e6f7728293a3a3a54494d455354414d50300068007000780080010088010098010042340a0f636f6e6e656374696f6e5f7479706510041a0c0807100018003000501960002000300068007000780080010088010098010042370a12636f6e6e656374696f6e5f64657461696c7310051a0c08081000180030005011600020003000680070007800800100880100980100422a0a056f776e657210061a0c08071000180030005019600020003000680070007800800100880100980100480752ae010a077072696d61727910011801220f636f6e6e656374696f6e5f6e616d652a07637265617465642a07757064617465642a0f636f6e6e656374696f6e5f747970652a12636f6e6e656374696f6e5f64657461696c732a056f776e6572300140004a10080010001a00200028003000380040005a00700270037004700570067a0408002000800100880100900104980101a20106080012001800a80100b20100ba0100c00100c80100d00101e0010060026a250a0d0a0561646d696e10e00318e0030a0c0a04726f6f7410e00318e00312046e6f64651802800101880103980100b201680a077072696d61727910001a0f636f6e6e656374696f6e5f6e616d651a07637265617465641a07757064617465641a0f636f6e6e656374696f6e5f747970651a12636f6e6e656374696f6e5f64657461696c731a056f776e65722001200220032004200520062800b80101c20100e80100f2010408001200f801008002009202009a0200b20200b80200c0021dc80200e00200800300880302a80300b00300"} -,{"key":"8d89888a89","value":"03108080804018808080800222040890bf052803500058007801"} -,{"key":"8f898888","value":"01c801"} -,{"key":"a68988881273797374656d00018c89","value":"0102"} -,{"key":"a6898988127075626c696300018c89","value":"013a"} -,{"key":"a68989a512636f6d6d656e747300018c89","value":"0130"} -,{"key":"a68989a51264617461626173655f726f6c655f73657474696e677300018c89","value":"0158"} -,{"key":"a68989a51264657363726970746f7200018c89","value":"0106"} -,{"key":"a68989a51264657363726970746f725f69645f73657100018c89","value":"010e"} -,{"key":"a68989a5126576656e746c6f6700018c89","value":"0118"} -,{"key":"a68989a51265787465726e616c5f636f6e6e656374696f6e7300018c89","value":"0168"} -,{"key":"a68989a5126a6f627300018c89","value":"011e"} -,{"key":"a68989a5126a6f696e5f746f6b656e7300018c89","value":"0152"} -,{"key":"a68989a5126c6561736500018c89","value":"0116"} -,{"key":"a68989a5126c6f636174696f6e7300018c89","value":"012a"} -,{"key":"a68989a5126d6967726174696f6e7300018c89","value":"0150"} -,{"key":"a68989a5126e616d65737061636500018c89","value":"013c"} -,{"key":"a68989a51270726976696c6567657300018c89","value":"0166"} -,{"key":"a68989a51270726f7465637465645f74735f6d65746100018c89","value":"013e"} -,{"key":"a68989a51270726f7465637465645f74735f7265636f72647300018c89","value":"0140"} -,{"key":"a68989a51272616e67656c6f6700018c89","value":"011a"} -,{"key":"a68989a5127265706c69636174696f6e5f636f6e73747261696e745f737461747300018c89","value":"0132"} -,{"key":"a68989a5127265706c69636174696f6e5f637269746963616c5f6c6f63616c697469657300018c89","value":"0134"} -,{"key":"a68989a5127265706c69636174696f6e5f737461747300018c89","value":"0136"} -,{"key":"a68989a5127265706f7274735f6d65746100018c89","value":"0138"} -,{"key":"a68989a512726f6c655f69645f73657100018c89","value":"0160"} -,{"key":"a68989a512726f6c655f6d656d6265727300018c89","value":"012e"} -,{"key":"a68989a512726f6c655f6f7074696f6e7300018c89","value":"0142"} -,{"key":"a68989a5127363686564756c65645f6a6f627300018c89","value":"014a"} -,{"key":"a68989a51273657474696e677300018c89","value":"010c"} -,{"key":"a68989a5127370616e5f636f756e7400018c89","value":"0164"} -,{"key":"a68989a51273716c5f696e7374616e63657300018c89","value":"015c"} -,{"key":"a68989a51273716c6c6976656e65737300018c89","value":"014e"} -,{"key":"a68989a51273746174656d656e745f62756e646c655f6368756e6b7300018c89","value":"0144"} -,{"key":"a68989a51273746174656d656e745f646961676e6f737469637300018c89","value":"0148"} -,{"key":"a68989a51273746174656d656e745f646961676e6f73746963735f726571756573747300018c89","value":"0146"} -,{"key":"a68989a51273746174656d656e745f7374617469737469637300018c89","value":"0154"} -,{"key":"a68989a5127461626c655f7374617469737469637300018c89","value":"0128"} -,{"key":"a68989a5127472616e73616374696f6e5f7374617469737469637300018c89","value":"0156"} -,{"key":"a68989a512756900018c89","value":"011c"} -,{"key":"a68989a512757365727300018c89","value":"0108"} -,{"key":"a68989a5127765625f73657373696f6e7300018c89","value":"0126"} -,{"key":"a68989a5127a6f6e657300018c89","value":"010a"} -,{"key":"b8898888","value":"01c801"} -]` - // nonSystem222SHA256 is the SHA-256 hash of the above constant. - nonSystem222SHA256 = `49b3e2d0bb0d18d711d2fff94b0c11db2e5caecf3c4fcc27d9bd277694647afd` - - // system222 is the hard-coded string representation of the + // system231 is the hard-coded string representation of the // initial values for a system tenant as produced by the 23.1 // release binary. // diff --git a/pkg/sql/crdb_internal_test.go b/pkg/sql/crdb_internal_test.go index 5ea13f86aeea..0aaf2956b8f8 100644 --- a/pkg/sql/crdb_internal_test.go +++ b/pkg/sql/crdb_internal_test.go @@ -22,7 +22,6 @@ import ( "time" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/col/coldata" "github.com/cockroachdb/cockroach/pkg/gossip" "github.com/cockroachdb/cockroach/pkg/jobs" @@ -40,7 +39,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/scheduledjobs" "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/server" "github.com/cockroachdb/cockroach/pkg/server/status/statuspb" "github.com/cockroachdb/cockroach/pkg/settings/cluster" "github.com/cockroachdb/cockroach/pkg/spanconfig" @@ -1408,47 +1406,6 @@ func TestInternalSystemJobsTableMirrorsSystemJobsTable(t *testing.T) { // TODO(adityamaru): add checks for payload and progress } -// TestInternalSystemJobsTableWorksWithVersionPreV23_1BackfillTypeColumnInJobsTable -// tests that crdb_internal.system_jobs and crdb_internal.jobs work when -// the server has a version pre-V23_1AddTypeColumnToJobsTable. In this version, -// the job_type column was added to the system.jobs table. -func TestInternalSystemJobsTableWorksWithVersionPreV23_1BackfillTypeColumnInJobsTable( - t *testing.T, -) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - s, db, _ := serverutils.StartServer(t, base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1BackfillTypeColumnInJobsTable - 1), - }, - }, - }) - ctx := context.Background() - defer s.Stopper().Stop(ctx) - tdb := sqlutils.MakeSQLRunner(db) - - tdb.Exec(t, - "SELECT * FROM crdb_internal.jobs", - ) - tdb.Exec(t, - "SELECT * FROM crdb_internal.system_jobs", - ) - // Exercise indexes. - tdb.Exec(t, - "SELECT * FROM crdb_internal.system_jobs WHERE job_type = 'CHANGEFEED'", - ) - tdb.Exec(t, - "SELECT * FROM crdb_internal.system_jobs WHERE id = 0", - ) - tdb.Exec(t, - "SELECT * FROM crdb_internal.system_jobs WHERE status = 'running'", - ) -} - // TestCorruptPayloadError asserts that we can an error // with the correct hint when we fail to decode a payload. func TestCorruptPayloadError(t *testing.T) { diff --git a/pkg/sql/create_function_test.go b/pkg/sql/create_function_test.go index 5b8abac05be0..235182dd5d48 100644 --- a/pkg/sql/create_function_test.go +++ b/pkg/sql/create_function_test.go @@ -16,9 +16,7 @@ import ( "testing" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/kv" - "github.com/cockroachdb/cockroach/pkg/server" "github.com/cockroachdb/cockroach/pkg/sql" "github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb" "github.com/cockroachdb/cockroach/pkg/sql/catalog/descs" @@ -149,97 +147,6 @@ SELECT nextval(105:::REGCLASS);`, require.NoError(t, err) } -func TestVersionGatingUDFInCheckConstraints(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - t.Run("new_schema_changer_version_enabled", func(t *testing.T) { - params, _ := createTestServerParams() - // Override binary version to be older. - params.Knobs.Server = &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1), - } - - s, sqlDB, _ := serverutils.StartServer(t, params) - defer s.Stopper().Stop(context.Background()) - - _, err := sqlDB.Exec(`CREATE FUNCTION f() RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$`) - require.NoError(t, err) - _, err = sqlDB.Exec(`CREATE TABLE t(a INT CHECK (f() > 0));`) - require.NoError(t, err) - }) - - t.Run("new_schema_changer_version_disabled", func(t *testing.T) { - params, _ := createTestServerParams() - // Override binary version to be older. - params.Knobs.Server = &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1 - 1), - } - - s, sqlDB, _ := serverutils.StartServer(t, params) - defer s.Stopper().Stop(context.Background()) - - // Need to turn new schema changer off, because function related rules are - // only valid in 23.1. - _, err := sqlDB.Exec(`SET use_declarative_schema_changer = 'off'`) - require.NoError(t, err) - _, err = sqlDB.Exec(`CREATE FUNCTION f() RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$`) - require.NoError(t, err) - _, err = sqlDB.Exec(`CREATE TABLE t(a INT CHECK (f() > 0));`) - require.Equal(t, "pq: unimplemented: usage of user-defined function from relations not supported", err.Error()) - }) -} - -func TestVersionGatingUDFInColumnDefault(t *testing.T) { - defer leaktest.AfterTest(t)() - - t.Run("new_schema_changer_version_enabled", func(t *testing.T) { - params, _ := createTestServerParams() - // Override binary version to be older. - params.Knobs.Server = &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1), - } - - s, sqlDB, _ := serverutils.StartServer(t, params) - defer s.Stopper().Stop(context.Background()) - - _, err := sqlDB.Exec(`CREATE FUNCTION f() RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$`) - require.NoError(t, err) - _, err = sqlDB.Exec(`CREATE TABLE t(a INT DEFAULT f());`) - require.NoError(t, err) - _, err = sqlDB.Exec(`ALTER TABLE t ALTER COLUMN a SET DEFAULT (f() + 1)`) - require.NoError(t, err) - }) - - t.Run("new_schema_changer_version_disabled", func(t *testing.T) { - params, _ := createTestServerParams() - // Override binary version to be older. - params.Knobs.Server = &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1 - 1), - } - - s, sqlDB, _ := serverutils.StartServer(t, params) - defer s.Stopper().Stop(context.Background()) - - // Need to turn new schema changer off, because function related rules are - // only valid in 23.1. - _, err := sqlDB.Exec(`SET use_declarative_schema_changer = 'off'`) - require.NoError(t, err) - _, err = sqlDB.Exec(`CREATE FUNCTION f() RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$`) - require.NoError(t, err) - _, err = sqlDB.Exec(`CREATE TABLE t(a INT DEFAULT f());`) - require.Equal(t, "pq: unimplemented: usage of user-defined function from relations not supported", err.Error()) - _, err = sqlDB.Exec(`CREATE TABLE t(a INT);`) - require.NoError(t, err) - _, err = sqlDB.Exec(`ALTER TABLE t ALTER COLUMN a SET DEFAULT (f() + 1)`) - require.Equal(t, "pq: unimplemented: usage of user-defined function from relations not supported", err.Error()) - }) -} - func TestCreateOrReplaceFunctionUpdateReferences(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) diff --git a/pkg/sql/gcjob_test/BUILD.bazel b/pkg/sql/gcjob_test/BUILD.bazel index a22a8ee4c5c7..f9b2a638ab80 100644 --- a/pkg/sql/gcjob_test/BUILD.bazel +++ b/pkg/sql/gcjob_test/BUILD.bazel @@ -12,7 +12,6 @@ go_test( shard_count = 2, deps = [ "//pkg/base", - "//pkg/clusterversion", "//pkg/jobs", "//pkg/jobs/jobspb", "//pkg/keys", diff --git a/pkg/sql/gcjob_test/gc_job_test.go b/pkg/sql/gcjob_test/gc_job_test.go index 8d230491b798..3e68d4d10a43 100644 --- a/pkg/sql/gcjob_test/gc_job_test.go +++ b/pkg/sql/gcjob_test/gc_job_test.go @@ -20,7 +20,6 @@ import ( "time" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/jobs" "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" "github.com/cockroachdb/cockroach/pkg/keys" @@ -30,7 +29,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/multitenant/mtinfopb" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/server" "github.com/cockroachdb/cockroach/pkg/settings/cluster" "github.com/cockroachdb/cockroach/pkg/sql" "github.com/cockroachdb/cockroach/pkg/sql/catalog/bootstrap" @@ -705,79 +703,3 @@ SELECT descriptor_id, index_id }) }) } - -func TestLegacyIndexGCSucceedsWithMissingDescriptor(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - var params base.TestServerArgs - // Override binary version to be older. - params.Knobs.Server = &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - // Need to disable MVCC since this test is testing the legacy GC path. - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1_MVCCRangeTombstonesUnconditionallyEnabled - 1), - } - params.Knobs.JobsTestingKnobs = jobs.NewTestingKnobsWithShortIntervals() - - s, sqlDB, _ := serverutils.StartServer(t, params) - defer s.Stopper().Stop(context.Background()) - tDB := sqlutils.MakeSQLRunner(sqlDB) - - tDB.Exec(t, `SET CLUSTER SETTING storage.mvcc.range_tombstones.enabled = false`) - tDB.Exec(t, `CREATE TABLE t(a INT)`) - tDB.Exec(t, `INSERT INTO t VALUES (1), (2)`) - tDB.Exec(t, `TRUNCATE TABLE t`) - - var truncateJobID string - testutils.SucceedsSoon(t, func() error { - rslt := tDB.QueryStr(t, `SELECT job_id, status, running_status FROM [SHOW JOBS] WHERE description = 'GC for TRUNCATE TABLE defaultdb.public.t'`) - if len(rslt) != 1 { - t.Fatalf("expect only 1 truncate job, found %d", len(rslt)) - } - if rslt[0][1] != "running" { - return errors.New("job not running yet") - } - if rslt[0][2] != "waiting for GC TTL" { - return errors.New("not waiting for gc yet") - } - truncateJobID = rslt[0][0] - return nil - }) - - tDB.Exec(t, `PAUSE JOB `+truncateJobID) - testutils.SucceedsSoon(t, func() error { - rslt := tDB.QueryStr(t, `SELECT status FROM [SHOW JOBS] WHERE job_id = `+truncateJobID) - if len(rslt) != 1 { - t.Fatalf("expect only 1 truncate job, found %d", len(rslt)) - } - if rslt[0][0] != "paused" { - return errors.New("job not paused yet") - } - return nil - }) - - tDB.Exec(t, `ALTER TABLE t CONFIGURE ZONE USING gc.ttlseconds = 1;`) - tDB.Exec(t, `DROP TABLE t`) - testutils.SucceedsSoon(t, func() error { - rslt := tDB.QueryStr(t, `SELECT status FROM [SHOW JOBS] WHERE description = 'GC for DROP TABLE defaultdb.public.t'`) - if len(rslt) != 1 { - t.Fatalf("expect only 1 truncate job, found %d", len(rslt)) - } - if rslt[0][0] != "succeeded" { - return errors.New("job not running yet") - } - return nil - }) - - tDB.Exec(t, `RESUME JOB `+truncateJobID) - testutils.SucceedsSoon(t, func() error { - rslt := tDB.QueryStr(t, `SELECT status FROM [SHOW JOBS] WHERE job_id = `+truncateJobID) - if len(rslt) != 1 { - t.Fatalf("expect only 1 truncate job, found %d", len(rslt)) - } - if rslt[0][0] != "succeeded" { - return errors.New("job not running") - } - return nil - }) -} diff --git a/pkg/sql/logictest/logic.go b/pkg/sql/logictest/logic.go index cace23f90b60..7c251a79dda2 100644 --- a/pkg/sql/logictest/logic.go +++ b/pkg/sql/logictest/logic.go @@ -1347,7 +1347,7 @@ func (t *logicTest) newCluster( if forSystemTenant { // System tenants use the constructor that doesn't initialize the // cluster version (see makeTestConfigFromParams). This is needed - // for local-mixed-22.2-23.1 config. + // for local-mixed configs. st = cluster.MakeClusterSettings() } else { // Regular tenants use the constructor that initializes the cluster diff --git a/pkg/sql/logictest/logictestbase/logictestbase.go b/pkg/sql/logictest/logictestbase/logictestbase.go index 577e7fbca805..e95b138d8fe6 100644 --- a/pkg/sql/logictest/logictestbase/logictestbase.go +++ b/pkg/sql/logictest/logictestbase/logictestbase.go @@ -267,6 +267,8 @@ var multiregion15node5region3azsLocalities = map[int]roachpb.Locality{ // If no configs are indicated in a test file, the default configs are used. // See DefaultConfigNames for the list of default configs. // +// Note: If you add a new config, you should run `./dev gen testlogic`. +// // Note: If you add a new config, it will not automatically run in CI for any // test files. It must either be included in the list of default configs or name // explicitly in a file-level "LogicTest:" comment. @@ -469,10 +471,12 @@ var LogicTestConfigs = []TestClusterConfig{ Localities: multiregion15node5region3azsLocalities, }, { - Name: "local-mixed-22.2-23.1", + // This config runs tests using 23.1 cluster version, simulating a node that + // is operating in a mixed-version cluster. + Name: "local-mixed-23.1", NumNodes: 1, OverrideDistSQLMode: "off", - BootstrapVersion: clusterversion.V22_2, + BootstrapVersion: clusterversion.V23_1, DisableUpgrade: true, DeclarativeCorpusCollection: true, }, @@ -548,7 +552,7 @@ var ( "fakedist", "fakedist-vec-off", "fakedist-disk", - "local-mixed-22.2-23.1", + "local-mixed-23.1", } // FiveNodeDefaultConfigName is a special alias for all 5 node configs. FiveNodeDefaultConfigName = "5node-default-configs" diff --git a/pkg/sql/logictest/testdata/logic_test/alter_primary_key b/pkg/sql/logictest/testdata/logic_test/alter_primary_key index d4bc89a53f19..45046705965d 100644 --- a/pkg/sql/logictest/testdata/logic_test/alter_primary_key +++ b/pkg/sql/logictest/testdata/logic_test/alter_primary_key @@ -1061,7 +1061,6 @@ ALTER TABLE t ALTER PRIMARY KEY USING COLUMNS (x) USING HASH WITH (bucket_count= # old shard column isn't removed by legacy schema changer. skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TT SHOW CREATE t ---- diff --git a/pkg/sql/logictest/testdata/logic_test/alter_role_set b/pkg/sql/logictest/testdata/logic_test/alter_role_set index 1a76dfc15a04..ca79d6342952 100644 --- a/pkg/sql/logictest/testdata/logic_test/alter_role_set +++ b/pkg/sql/logictest/testdata/logic_test/alter_role_set @@ -172,19 +172,16 @@ statement ok REVOKE SYSTEM MODIFYCLUSTERSETTING FROM testuser # Verify users with MODIFYSQLCLUSTERSETTING can ALTER ROLE SET -skipif config local-mixed-22.2-23.1 statement ok GRANT SYSTEM MODIFYSQLCLUSTERSETTING TO testuser user testuser -skipif config local-mixed-22.2-23.1 statement ok ALTER ROLE testuser RESET application_name user root -skipif config local-mixed-22.2-23.1 statement ok REVOKE SYSTEM MODIFYSQLCLUSTERSETTING FROM testuser diff --git a/pkg/sql/logictest/testdata/logic_test/alter_table b/pkg/sql/logictest/testdata/logic_test/alter_table index 4fb46f0efb6f..cd300d37bba4 100644 --- a/pkg/sql/logictest/testdata/logic_test/alter_table +++ b/pkg/sql/logictest/testdata/logic_test/alter_table @@ -229,7 +229,6 @@ SCHEMA CHANGE DROP INDEX test.public.t@foo CASCADE root succeeded skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TTTTRT retry SELECT job_type, description, user_name, status, fraction_completed, error FROM crdb_internal.jobs @@ -329,7 +328,6 @@ SCHEMA CHANGE GC GC for DROP INDEX test.public.t@t_f_idx root running 0 SCHEMA CHANGE DROP INDEX test.public.t@t_f_idx root succeeded 1 · skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TTTTRT retry SELECT job_type, description, user_name, status, fraction_completed, error FROM crdb_internal.jobs @@ -2112,7 +2110,6 @@ statement ok ALTER TABLE t ADD CONSTRAINT t_pkey PRIMARY KEY (id) skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TT SHOW CREATE TABLE t ---- @@ -2806,7 +2803,6 @@ statement ok ALTER TABLE t_96115 ADD CHECK (i > nextval('seq_96115') AND j::typ_96115 = 'a'::typ_96115); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TTTB colnames SELECT table_name, constraint_name, constraint_type, validated FROM [SHOW CONSTRAINTS FROM t_96115] @@ -2820,7 +2816,6 @@ statement ok ALTER TABLE t_96115 DROP CONSTRAINT check_i_j; skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TTTB colnames SELECT table_name, constraint_name, constraint_type, validated FROM [SHOW CONSTRAINTS FROM t_96115] @@ -2833,7 +2828,6 @@ statement ok ALTER TABLE t_96115 ADD CHECK (i > nextval('seq_96115') AND j::typ_96115 = 'a'::typ_96115); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TTTB colnames SELECT table_name, constraint_name, constraint_type, validated FROM [SHOW CONSTRAINTS FROM t_96115] @@ -2847,7 +2841,6 @@ statement ok DROP SEQUENCE seq_96115 CASCADE; skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query TTTB colnames SELECT table_name, constraint_name, constraint_type, validated FROM [SHOW CONSTRAINTS FROM t_96115] @@ -3195,12 +3188,10 @@ CREATE TABLE t_99035 (i INT PRIMARY KEY, j INT NOT NULL, FAMILY "primary" (i, j) INSERT INTO t_99035 VALUES (0,0); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement ok ALTER TABLE t_99035 ADD COLUMN k INT DEFAULT unique_rowid(), DROP COLUMN j; skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query T SELECT create_statement FROM [SHOW CREATE TABLE t_99035] ---- @@ -3211,17 +3202,14 @@ CREATE TABLE public.t_99035 ( ) skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement ok ALTER TABLE t_99035 ADD COLUMN j INT DEFAULT unique_rowid(), DROP COLUMN j; -- noop skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement ok ALTER TABLE t_99035 ADD COLUMN j INT, DROP COLUMN j; -- noop skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query T SELECT create_statement FROM [SHOW CREATE TABLE t_99035] ---- @@ -3237,12 +3225,10 @@ CREATE TABLE t_99035 (i INT PRIMARY KEY, j INT NOT NULL, FAMILY "primary" (i, j) INSERT INTO t_99035 VALUES (0,0); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement ok ALTER TABLE t_99035 ADD COLUMN k INT DEFAULT unique_rowid(), ALTER PRIMARY KEY USING COLUMNS (j); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query T SELECT create_statement FROM [SHOW CREATE TABLE t_99035] ---- @@ -3260,12 +3246,10 @@ CREATE TABLE t_99035 (i INT PRIMARY KEY, j INT NOT NULL, FAMILY "primary" (i, j) INSERT INTO t_99035 VALUES (0,0); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement ok ALTER TABLE t_99035 ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i; skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query T SELECT create_statement FROM [SHOW CREATE TABLE t_99035] ---- @@ -3280,12 +3264,12 @@ CREATE TABLE t_99035 (i INT PRIMARY KEY, j INT NOT NULL, FAMILY "primary" (i, j) INSERT INTO t_99035 VALUES (0,0); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok ALTER TABLE t_99035 ADD COLUMN k INT DEFAULT unique_rowid(), ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i; skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SELECT create_statement FROM [SHOW CREATE TABLE t_99035] ---- @@ -3301,7 +3285,7 @@ CREATE TABLE t_99035 (i INT PRIMARY KEY, j INT NOT NULL, FAMILY "primary" (i, j) INSERT INTO t_99035 VALUES (0,0); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error validation of CHECK "j > 0:::INT8" failed on row: j=0, k=[0-9]+, p=30 ALTER TABLE t_99035 ADD COLUMN k INT DEFAULT unique_rowid(), ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i, ADD COLUMN p INT DEFAULT 30, ADD CHECK (j>0); @@ -3311,12 +3295,12 @@ SELECT * FROM t_99035 0 0 skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok ALTER TABLE t_99035 ADD COLUMN k INT DEFAULT unique_rowid(), ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i, ADD COLUMN p INT DEFAULT 30, ADD CHECK (j>=0); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SELECT create_statement FROM [SHOW CREATE TABLE t_99035] ---- @@ -3334,12 +3318,12 @@ CREATE TABLE t_99035 (i INT PRIMARY KEY, j INT NOT NULL, FAMILY "primary" (i, j) INSERT INTO t_99035 VALUES (0,0); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok ALTER TABLE t_99035 ADD COLUMN k INT DEFAULT unique_rowid(), ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i, ADD COLUMN p INT DEFAULT 0, ADD CHECK (j>=0), ADD FOREIGN KEY (p) REFERENCES t_99035(j); skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SELECT create_statement FROM [SHOW CREATE TABLE t_99035] ---- @@ -3394,7 +3378,7 @@ ALTER TABLE t_99281 ADD COLUMN p INT DEFAULT unique_rowid(), ADD UNIQUE WITHOUT # The following statement will cause the stmt to hang using the legacy schema changer. skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pq: could not create unique constraint ".*" ALTER TABLE t_99281 DROP COLUMN k, ADD UNIQUE WITHOUT INDEX (j); @@ -3412,7 +3396,7 @@ ALTER TABLE t_99281 ADD COLUMN p INT DEFAULT unique_rowid(), ADD FOREIGN KEY (j) # The following statement is not supported using the legacy schema changer. skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pq: foreign key violation: "t_99281" row j=0, i=[0-1] has no match in "t_99281_other" ALTER TABLE t_99281 ALTER PRIMARY KEY USING COLUMNS (k), ADD FOREIGN KEY (j) REFERENCES t_99281_other; diff --git a/pkg/sql/logictest/testdata/logic_test/cluster_settings b/pkg/sql/logictest/testdata/logic_test/cluster_settings index 168c5ee6d501..ca68bde57929 100644 --- a/pkg/sql/logictest/testdata/logic_test/cluster_settings +++ b/pkg/sql/logictest/testdata/logic_test/cluster_settings @@ -129,21 +129,17 @@ SET CLUSTER SETTING sql.defaults.default_int_size = 4 # Users with MODIFYSQLCLUSTERSETTING system privilege should be able to see and modify only sql.defaults settings. user root -skipif config local-mixed-22.2-23.1 statement ok GRANT SYSTEM MODIFYSQLCLUSTERSETTING TO testuser user testuser -skipif config local-mixed-22.2-23.1 statement ok SHOW CLUSTER SETTINGS -skipif config local-mixed-22.2-23.1 statement error pq: only users with MODIFYCLUSTERSETTING or VIEWCLUSTERSETTING privileges are allowed to show cluster setting 'diagnostics.reporting.enabled' SHOW CLUSTER SETTING diagnostics.reporting.enabled -skipif config local-mixed-22.2-23.1 statement ok SET CLUSTER SETTING sql.defaults.default_int_size = 4 @@ -172,7 +168,6 @@ true user root -skipif config local-mixed-22.2-23.1 statement ok REVOKE SYSTEM MODIFYSQLCLUSTERSETTING FROM testuser @@ -295,42 +290,34 @@ statement error ALTER VIRTUAL CLUSTER can only be called by system operators ALTER TENANT [10] SET CLUSTER SETTING server.mem_profile.total_dump_size_limit='10M' skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement error cannot use this statement to access cluster settings in system tenant ALTER TENANT [1] SET CLUSTER SETTING server.mem_profile.total_dump_size_limit='10M' skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement ok SELECT crdb_internal.create_tenant(10) skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement ok ALTER TENANT "cluster-10" SET CLUSTER SETTING server.mem_profile.total_dump_size_limit='5M' skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement ok ALTER TENANT [10] SET CLUSTER SETTING server.mem_profile.total_dump_size_limit='10M' skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement ok ALTER TENANT ALL SET CLUSTER SETTING server.mem_profile.total_dump_size_limit='10M' skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement ok ALTER TENANT [10] RESET CLUSTER SETTING server.mem_profile.total_dump_size_limit skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement ok ALTER TENANT "cluster-10" RESET CLUSTER SETTING server.mem_profile.total_dump_size_limit skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 statement ok ALTER TENANT ALL RESET CLUSTER SETTING server.mem_profile.total_dump_size_limit @@ -344,24 +331,20 @@ SHOW CLUSTER SETTING server.mem_profile.total_dump_size_limit FOR TENANT [0] skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query error cannot use this statement to access cluster settings in system tenant SHOW CLUSTER SETTING server.mem_profile.total_dump_size_limit FOR TENANT [1] skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query error tenant "1111" does not exist SHOW CLUSTER SETTING server.mem_profile.total_dump_size_limit FOR TENANT [1111] skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query T SHOW CLUSTER SETTING server.mem_profile.total_dump_size_limit FOR TENANT [10] ---- NULL skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query T SHOW CLUSTER SETTING server.mem_profile.total_dump_size_limit FOR TENANT "cluster-10" ---- @@ -372,23 +355,19 @@ query error SHOW CLUSTER SETTINGS FOR TENANT can only be called by system operat SHOW CLUSTER SETTINGS FOR TENANT [10] skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query error invalid tenant ID 0 SHOW CLUSTER SETTINGS FOR TENANT [0] skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query error use SHOW CLUSTER SETTINGS to display settings for the system tenant SHOW CLUSTER SETTINGS FOR TENANT [1] skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query error tenant "1111" does not exist SHOW CLUSTER SETTINGS FOR TENANT [1111] # The IN clause should contain one public and one hidden cluster setting. skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query TTT SELECT variable, type, origin FROM [SHOW CLUSTER SETTINGS FOR TENANT [10]] WHERE variable IN ('jobs.scheduler.enabled', 'jobs.retention_time') ORDER BY 1 @@ -396,7 +375,6 @@ WHERE variable IN ('jobs.scheduler.enabled', 'jobs.retention_time') ORDER BY 1 jobs.retention_time d no-override skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query TTT SELECT variable, type, origin FROM [SHOW CLUSTER SETTINGS FOR TENANT "cluster-10"] WHERE variable IN ('jobs.scheduler.enabled', 'jobs.retention_time') ORDER BY 1 @@ -404,7 +382,6 @@ WHERE variable IN ('jobs.scheduler.enabled', 'jobs.retention_time') ORDER BY 1 jobs.retention_time d no-override skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query TTBT SELECT variable, type, public, origin FROM [SHOW ALL CLUSTER SETTINGS FOR TENANT [10]] WHERE variable IN ('jobs.scheduler.enabled', 'jobs.retention_time') ORDER BY 1 @@ -413,7 +390,6 @@ jobs.retention_time d true no-override jobs.scheduler.enabled b false no-override skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 query TTBT SELECT variable, type, public, origin FROM [SHOW ALL CLUSTER SETTINGS FOR TENANT "cluster-10"] WHERE variable IN ('jobs.scheduler.enabled', 'jobs.retention_time') ORDER BY 1 diff --git a/pkg/sql/logictest/testdata/logic_test/composite_types b/pkg/sql/logictest/testdata/logic_test/composite_types index 92b7587646eb..5b70ac6ddc96 100644 --- a/pkg/sql/logictest/testdata/logic_test/composite_types +++ b/pkg/sql/logictest/testdata/logic_test/composite_types @@ -1,4 +1,4 @@ -# LogicTest: default-configs !local-mixed-22.2-23.1 +# LogicTest: default-configs statement ok CREATE TYPE t AS (a INT, b INT) diff --git a/pkg/sql/logictest/testdata/logic_test/crdb_internal b/pkg/sql/logictest/testdata/logic_test/crdb_internal index 9caec2088c56..ac758484f858 100644 --- a/pkg/sql/logictest/testdata/logic_test/crdb_internal +++ b/pkg/sql/logictest/testdata/logic_test/crdb_internal @@ -566,7 +566,6 @@ INSERT INTO system.zones (id, config) VALUES ($testdb_foo_id, (SELECT raw_config_protobuf FROM crdb_internal.zones WHERE zone_id = 0)), ($schema_bar_id, (SELECT raw_config_protobuf FROM crdb_internal.zones WHERE zone_id = 0)) -skipif config local-mixed-22.2-23.1 query IT SELECT zone_id, target FROM crdb_internal.zones ORDER BY 1 ---- @@ -1282,13 +1281,11 @@ true user root -skipif config local-mixed-22.2-23.1 statement ok GRANT SYSTEM MODIFYSQLCLUSTERSETTING TO testuser user testuser -skipif config local-mixed-22.2-23.1 query T SELECT value FROM crdb_internal.cluster_settings WHERE variable IN ('diagnostics.reporting.enabled') ---- @@ -1299,7 +1296,6 @@ user root statement ok REVOKE SYSTEM VIEWCLUSTERSETTING FROM testuser -skipif config local-mixed-22.2-23.1 statement ok REVOKE SYSTEM MODIFYSQLCLUSTERSETTING FROM testuser @@ -1355,19 +1351,16 @@ awaitstatement sleepQuery user root -skipif config local-mixed-22.2-23.1 statement ok GRANT SYSTEM MODIFYSQLCLUSTERSETTING TO testuser user testuser -skipif config local-mixed-22.2-23.1 query T SELECT value FROM crdb_internal.cluster_settings WHERE variable IN ('sql.defaults.zigzag_join.enabled') ---- false -skipif config local-mixed-22.2-23.1 query T SELECT value FROM crdb_internal.cluster_settings WHERE variable IN ('diagnostics.reporting.enabled') ---- @@ -1375,7 +1368,6 @@ SELECT value FROM crdb_internal.cluster_settings WHERE variable IN ('diagnostics user root -skipif config local-mixed-22.2-23.1 statement ok REVOKE SYSTEM MODIFYSQLCLUSTERSETTING FROM testuser @@ -1458,7 +1450,7 @@ CREATE FUNCTION f(STRING, b INT) RETURNS STRING STRICT IMMUTABLE LEAKPROOF LANGU # Add a procedure to ensure that it doesn't show up in the # create_function_statements table. -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE f(BOOL) LANGUAGE SQL AS $$ SELECT 1 $$; @@ -1551,7 +1543,7 @@ test_cross_db public f_cross_db CREATE FUNCTION public.f_cross_db() SELECT 1; $$ -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok DROP PROCEDURE f(BOOL); @@ -1570,29 +1562,29 @@ subtest end subtest create_procedure_statements -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE p(INT) LANGUAGE SQL AS $$ SELECT 1 $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE p(STRING, b INT) LANGUAGE SQL AS $$ SELECT 'hello' $$; # Add a function to ensure that it doesn't show up in the # create_procedure_statements table. -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE FUNCTION p(BOOL) RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE SCHEMA sc; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement CREATE PROCEDURE sc.p2(STRING) LANGUAGE SQL AS $$ SELECT 'hello' $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query ITITITT SELECT database_id, database_name, schema_id, schema_name, procedure_id, procedure_name, create_statement FROM crdb_internal.create_procedure_statements @@ -1615,14 +1607,14 @@ ORDER BY procedure_id; SELECT 'hello'; $$ -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE DATABASE test_cross_db; USE test_cross_db; CREATE PROCEDURE p_cross_db() LANGUAGE SQL AS $$ SELECT 1 $$; USE test; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query ITITITT SELECT database_id, database_name, schema_id, schema_name, procedure_id, procedure_name, create_statement FROM "".crdb_internal.create_procedure_statements @@ -1650,7 +1642,7 @@ ORDER BY procedure_id; SELECT 1; $$ -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok DROP PROCEDURE p(INT); DROP PROCEDURE p(STRING, INT); diff --git a/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog b/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog index 3616fbf8fc9a..3180cbb7fd78 100644 --- a/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog +++ b/pkg/sql/logictest/testdata/logic_test/crdb_internal_catalog @@ -100,7 +100,7 @@ SELECT ) $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query IT SELECT id, strip_volatile(descriptor) FROM crdb_internal.kv_catalog_descriptor ORDER BY id ---- diff --git a/pkg/sql/logictest/testdata/logic_test/create_index b/pkg/sql/logictest/testdata/logic_test/create_index index d6d45a1cae59..d78b82aa732d 100644 --- a/pkg/sql/logictest/testdata/logic_test/create_index +++ b/pkg/sql/logictest/testdata/logic_test/create_index @@ -96,7 +96,6 @@ CREATE TABLE privs (a INT PRIMARY KEY, b INT) user testuser skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement error must be owner of table privs or have CREATE privilege on table privs CREATE INDEX foo ON privs (b) @@ -276,7 +275,6 @@ SELECT 'tbl'::regclass::int # hold the json text for the resume spans we want. We'll verify them below. # This is some really low-level mucking around. Things to know are that 0xfe # is the tenant prefix. -skipif config local-mixed-22.2-23.1 let $spans WITH span AS ( SELECT j->'schemaChange'->'resumeSpanList'->0->'resumeSpans'->0 AS span @@ -326,7 +324,6 @@ SELECT json_build_array( # spans that both the wrong tenant ID or no tenant ID before resuming it to make # sure that on resume it re-keys the spans correctly. We pretty_key these below # to confirm/show what is in them. -skipif config local-mixed-22.2-23.1 statement ok UPDATE system.job_info SET value = crdb_internal.json_to_pb( @@ -341,7 +338,6 @@ WHERE info_key = 'legacy_payload' AND crdb_internal.pb_to_json('cockroach.sql.jo # confirm we see these bogus start and end keys in the job, both for the wrong # tenant and for no tenant. -skipif config local-mixed-22.2-23.1 query TTTT SELECT crdb_internal.pretty_key(decode(j->'schemaChange'->'resumeSpanList'->0->'resumeSpans'->0->>'key', 'base64'), 0), diff --git a/pkg/sql/logictest/testdata/logic_test/drop_index b/pkg/sql/logictest/testdata/logic_test/drop_index index 021880eccc05..3187defda660 100644 --- a/pkg/sql/logictest/testdata/logic_test/drop_index +++ b/pkg/sql/logictest/testdata/logic_test/drop_index @@ -100,7 +100,6 @@ users users_pkey false 3 title title N/A user testuser skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement error must be owner of table users or have CREATE privilege on table users DROP INDEX users@bar diff --git a/pkg/sql/logictest/testdata/logic_test/drop_owned_by b/pkg/sql/logictest/testdata/logic_test/drop_owned_by index 35bed89f0785..59164955263d 100644 --- a/pkg/sql/logictest/testdata/logic_test/drop_owned_by +++ b/pkg/sql/logictest/testdata/logic_test/drop_owned_by @@ -647,12 +647,10 @@ ALTER FUNCTION f_drop_udf OWNER TO u_drop_udf; # TODO(chengxiong): DROP function was only enabled in 23.1. This skip can be # removed in 23.2. -skipif config local-mixed-22.2-23.1 statement ok DROP OWNED BY u_drop_udf; # TODO(chengxiong): DROP function was only enabled in 23.1. This skip can be # removed in 23.2. -skipif config local-mixed-22.2-23.1 statement error pq: unknown function: f_drop_udf\(\) SHOW CREATE FUNCTION f_drop_udf; diff --git a/pkg/sql/logictest/testdata/logic_test/drop_procedure b/pkg/sql/logictest/testdata/logic_test/drop_procedure index ec08fed36e49..cfbebaac04a2 100644 --- a/pkg/sql/logictest/testdata/logic_test/drop_procedure +++ b/pkg/sql/logictest/testdata/logic_test/drop_procedure @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE PROCEDURE p_test_drop() LANGUAGE SQL AS 'SELECT 1' diff --git a/pkg/sql/logictest/testdata/logic_test/drop_table b/pkg/sql/logictest/testdata/logic_test/drop_table index 43de55b7cd5a..37dbdfcfb7f2 100644 --- a/pkg/sql/logictest/testdata/logic_test/drop_table +++ b/pkg/sql/logictest/testdata/logic_test/drop_table @@ -165,7 +165,6 @@ DROP SEQUENCE t_not_valid_sq CASCADE; # Also the destination descriptor should be valid after the FK clean up. Note: # skip on older configs since this is an existing bug, not a new regression # (see #97871). -skipif config local-mixed-22.2-23.1 skipif config local-legacy-schema-changer statement ok INSERT INTO t_not_valid_dst VALUES(5,5,5); diff --git a/pkg/sql/logictest/testdata/logic_test/event_log b/pkg/sql/logictest/testdata/logic_test/event_log index bae131cbf572..60e99c6cd36b 100644 --- a/pkg/sql/logictest/testdata/logic_test/event_log +++ b/pkg/sql/logictest/testdata/logic_test/event_log @@ -1,6 +1,6 @@ -# Legacy schema changer is also skipped because mutation IDs throughout log +# Legacy schema changer is skipped because mutation IDs throughout log # entries will differ. "event_log_legacy" file is for the legacy schema changer. -# LogicTest: !local-legacy-schema-changer !local-mixed-22.2-23.1 +# LogicTest: !local-legacy-schema-changer # knob-opt: sync-event-log # For some reason, some of the queries produce non-deterministic results if diff --git a/pkg/sql/logictest/testdata/logic_test/expression_index b/pkg/sql/logictest/testdata/logic_test/expression_index index e0a692b12d9a..06f2ed3cef7e 100644 --- a/pkg/sql/logictest/testdata/logic_test/expression_index +++ b/pkg/sql/logictest/testdata/logic_test/expression_index @@ -1,4 +1,4 @@ -# LogicTest: default-configs !local-mixed-22.2-23.1 +# LogicTest: default-configs !local-mixed-23.1 statement ok CREATE TABLE t ( @@ -261,7 +261,6 @@ SELECT * FROM ( {"computeExpr": "a + 10:::INT8", "id": 9, "inaccessible": true, "name": "crdb_internal_idx_expr_2", "nullable": true, "type": {"family": "IntFamily", "oid": 20, "width": 64}, "virtual": true} skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query T SELECT * FROM ( SELECT json_array_elements( @@ -278,7 +277,6 @@ DROP INDEX t_lower_c_a_plus_b_idx # because other indexes contain them. # exists in the descriptor. skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 query T SELECT cols.desc FROM ( SELECT id, json_array_elements( diff --git a/pkg/sql/logictest/testdata/logic_test/fk_read_committed b/pkg/sql/logictest/testdata/logic_test/fk_read_committed index 5c42d5d5909a..f2d19981ac2c 100644 --- a/pkg/sql/logictest/testdata/logic_test/fk_read_committed +++ b/pkg/sql/logictest/testdata/logic_test/fk_read_committed @@ -1,5 +1,3 @@ -# LogicTest: !local-mixed-22.2-23.1 - statement ok SET CLUSTER SETTING sql.txn.read_committed_syntax.enabled = true diff --git a/pkg/sql/logictest/testdata/logic_test/gc_job_mixed b/pkg/sql/logictest/testdata/logic_test/gc_job_mixed index 20a1baa97de0..028fd0472f0f 100644 --- a/pkg/sql/logictest/testdata/logic_test/gc_job_mixed +++ b/pkg/sql/logictest/testdata/logic_test/gc_job_mixed @@ -1,4 +1,4 @@ -# LogicTest: local local-mixed-22.2-23.1 +# LogicTest: local local-mixed-23.1 statement ok CREATE DATABASE db @@ -21,7 +21,6 @@ statement ok DROP DATABASE db # GC jobs in a non-mixed-version cluster, 23.1+ style. -skipif config local-mixed-22.2-23.1 query T rowsort SELECT description FROM crdb_internal.jobs WHERE job_type = 'SCHEMA CHANGE GC' ---- @@ -29,17 +28,6 @@ GC for ALTER TABLE db.public.kv ALTER PRIMARY KEY USING COLUMNS (k) GC for DROP TABLE db.public.kv GC for DROP DATABASE db -# GC jobs in a mixed-version cluster, pre-23.1 style. -skipif config local -query T rowsort -SELECT description FROM crdb_internal.jobs WHERE job_type = 'SCHEMA CHANGE GC' ----- -GC for removed temporary index; ALTER TABLE db.public.kv ALTER PRIMARY KEY USING COLUMNS (k) -GC for removed primary index; ALTER TABLE db.public.kv ALTER PRIMARY KEY USING COLUMNS (k) -GC for removed primary index; ALTER TABLE db.public.kv ALTER PRIMARY KEY USING COLUMNS (k) -GC for DROP TABLE db.public.kv -GC for DROP DATABASE db - query I SELECT count(*) FROM crdb_internal.lost_descriptors_with_data ---- diff --git a/pkg/sql/logictest/testdata/logic_test/guardrails b/pkg/sql/logictest/testdata/logic_test/guardrails index c97c06034f2c..ab1de2e3a82e 100644 --- a/pkg/sql/logictest/testdata/logic_test/guardrails +++ b/pkg/sql/logictest/testdata/logic_test/guardrails @@ -1,4 +1,4 @@ -# LogicTest: !metamorphic-batch-sizes local local-legacy-schema-changer local-mixed-22.2-23.1 local-vec-off +# LogicTest: !metamorphic-batch-sizes local local-legacy-schema-changer local-mixed-23.1 local-vec-off # We disable metamorphic batch sizes and only use local configs so that we read # a predictable number of rows in each limited scan. diff --git a/pkg/sql/logictest/testdata/logic_test/hash_sharded_index_read_committed b/pkg/sql/logictest/testdata/logic_test/hash_sharded_index_read_committed index 35968020ac6b..8934d830a6ab 100644 --- a/pkg/sql/logictest/testdata/logic_test/hash_sharded_index_read_committed +++ b/pkg/sql/logictest/testdata/logic_test/hash_sharded_index_read_committed @@ -1,5 +1,3 @@ -# LogicTest: !local-mixed-22.2-23.1 - statement ok SET CLUSTER SETTING sql.txn.read_committed_syntax.enabled = true diff --git a/pkg/sql/logictest/testdata/logic_test/information_schema b/pkg/sql/logictest/testdata/logic_test/information_schema index 33ce9aa511b9..b20942a5f973 100644 --- a/pkg/sql/logictest/testdata/logic_test/information_schema +++ b/pkg/sql/logictest/testdata/logic_test/information_schema @@ -1135,7 +1135,7 @@ table_constraints table_columns # Check that the metadata is reported properly. -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTTTI colnames SELECT * FROM system.information_schema.tables ORDER BY table_name, table_schema ---- @@ -1562,7 +1562,7 @@ SET DATABASE = test ## information_schema.check_constraints ## information_schema.constraint_column_usage -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTTTTTTT colnames SELECT * FROM system.information_schema.table_constraints @@ -1904,7 +1904,7 @@ NULL NULL UTF8 UCS NULL NULL UTF8 UCS UTF8 test NULL NULL -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTT colnames SELECT * FROM system.information_schema.check_constraints @@ -2166,7 +2166,7 @@ system public check_crdb_internal_end_time_start_time_s system public check_sampling_probability ((sampling_probability BETWEEN 0.0:::FLOAT8 AND 1.0:::FLOAT8)) system public check_singleton ((singleton)) -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTTTTT colnames SELECT * FROM system.information_schema.constraint_column_usage @@ -2392,7 +2392,7 @@ select data_type, column_default from information_schema.columns where table_nam data_type column_default smallint 0 -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTTI colnames SELECT table_catalog, table_schema, table_name, column_name, ordinal_position FROM system.information_schema.columns @@ -3254,7 +3254,7 @@ root other_db public ALL YES ## information_schema.table_privileges and information_schema.role_table_grants -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 # root can see everything query TTTTTTTT colnames,rowsort SELECT * FROM system.information_schema.table_privileges ORDER BY table_schema, table_name, table_schema, grantee, privilege_type @@ -3950,7 +3950,7 @@ NULL root system public zones NULL root system public zones SELECT YES YES NULL root system public zones UPDATE YES NO -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTTTTTT colnames,rowsort SELECT * FROM system.information_schema.role_table_grants ---- diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_index_multi_column b/pkg/sql/logictest/testdata/logic_test/inverted_index_multi_column index 689409d7d73b..7abb20661480 100644 --- a/pkg/sql/logictest/testdata/logic_test/inverted_index_multi_column +++ b/pkg/sql/logictest/testdata/logic_test/inverted_index_multi_column @@ -323,7 +323,7 @@ SELECT * FROM backfill_d@idx WHERE i IN (1, 2, 3, 4) AND s = 'bar' AND j @> '7': # Test selecting, inserting, updating, and deleting on a table with a # multi-column JSON inverted index. -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE TABLE d ( id INT PRIMARY KEY, @@ -332,9 +332,9 @@ CREATE TABLE d ( INVERTED INDEX idx (foo, bar) ); -# On 22.2 these inverted indexes could not be created, so skip this +# Before 23.2 these inverted indexes could not be created, so skip this # test by making a normal index -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 statement ok CREATE TABLE d ( id INT PRIMARY KEY, @@ -406,18 +406,18 @@ INSERT into d VALUES (8, '"backfilling"', '[[0], [1], [2], []]') -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE INVERTED INDEX idx on d (foo, bar) -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query ITT SELECT id, foo, bar FROM d@idx where foo = '"backfilling"' AND bar->2 @> '2' ORDER BY id ---- 6 "backfilling" [[0], [1], 2, 3] 8 "backfilling" [[0], [1], [2], []] -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query ITT SELECT id, foo, bar FROM d@idx where foo = '"foo"' AND bar->0 = '7' ORDER BY id ---- diff --git a/pkg/sql/logictest/testdata/logic_test/jobs b/pkg/sql/logictest/testdata/logic_test/jobs index 52c2bf4895a5..f285c5237d91 100644 --- a/pkg/sql/logictest/testdata/logic_test/jobs +++ b/pkg/sql/logictest/testdata/logic_test/jobs @@ -184,17 +184,11 @@ RESUME JOB (SELECT $job_id) user root -skipif config local-mixed-22.2-23.1 statement ok GRANT SYSTEM VIEWJOB TO testuser -onlyif config local-mixed-22.2-23.1 -statement error upgrade must be finalized before using VIEWJOB system privilege -GRANT SYSTEM VIEWJOB TO testuser - user testuser -skipif config local-mixed-22.2-23.1 # testuser should be able to see all jobs query TTT SELECT job_type, description, user_name FROM crdb_internal.jobs WHERE job_type = 'SCHEMA CHANGE GC' ORDER BY 1, 2, 3 @@ -207,7 +201,6 @@ SCHEMA CHANGE GC GC for temporary index used during index backfill testuser2 user root -skipif config local-mixed-22.2-23.1 statement ok REVOKE SYSTEM VIEWJOB FROM testuser @@ -224,7 +217,6 @@ user root statement ok CREATE ROLE jobviewer -skipif config local-mixed-22.2-23.1 statement ok GRANT SYSTEM VIEWJOB TO jobviewer @@ -233,7 +225,6 @@ GRANT jobviewer TO testuser user testuser -skipif config local-mixed-22.2-23.1 # testuser should be able to see all jobs query TTT SELECT job_type, description, user_name FROM crdb_internal.jobs WHERE job_type = 'SCHEMA CHANGE GC' ORDER BY 1, 2, 3 @@ -268,14 +259,12 @@ ORDER BY feature_name DESC job.schema_change.successful # Ensure one POLL JOBS STATS job is running -skipif config local-mixed-22.2-23.1 query I SELECT count(*) FROM [SHOW AUTOMATIC JOBS] WHERE job_type = 'POLL JOBS STATS' AND status = 'running' ---- 1 # Ensure one AUTO CONFIG RUNNER job is running -skipif config local-mixed-22.2-23.1 query I SELECT count(*) FROM [SHOW AUTOMATIC JOBS] WHERE job_type = 'AUTO CONFIG RUNNER' AND status = 'running' ---- diff --git a/pkg/sql/logictest/testdata/logic_test/json b/pkg/sql/logictest/testdata/logic_test/json index 2044ac9f6af4..d7853b5651b7 100644 --- a/pkg/sql/logictest/testdata/logic_test/json +++ b/pkg/sql/logictest/testdata/logic_test/json @@ -182,7 +182,7 @@ SELECT bar FROM foo WHERE bar->'a' = '"b"'::JSON statement ok SELECT bar FROM foo ORDER BY bar -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE TABLE pk (k JSON PRIMARY KEY) diff --git a/pkg/sql/logictest/testdata/logic_test/json_index b/pkg/sql/logictest/testdata/logic_test/json_index index 2c1c076dd931..3b13fc1c9b04 100644 --- a/pkg/sql/logictest/testdata/logic_test/json_index +++ b/pkg/sql/logictest/testdata/logic_test/json_index @@ -1,4 +1,4 @@ -# LogicTest: default-configs !local-mixed-22.2-23.1 +# LogicTest: default-configs !local-mixed-23.1 # Add JSON columns as primary index. statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/json_index_local_mixed b/pkg/sql/logictest/testdata/logic_test/json_index_local_mixed index dce14b26e86b..3b41995f66ac 100644 --- a/pkg/sql/logictest/testdata/logic_test/json_index_local_mixed +++ b/pkg/sql/logictest/testdata/logic_test/json_index_local_mixed @@ -1,4 +1,4 @@ -# LogicTest: local-mixed-22.2-23.1 +# LogicTest: local-mixed-23.1 statement ok SET use_declarative_schema_changer = 'off' diff --git a/pkg/sql/logictest/testdata/logic_test/new_schema_changer b/pkg/sql/logictest/testdata/logic_test/new_schema_changer index 0c732045ff51..64d29711bd8e 100644 --- a/pkg/sql/logictest/testdata/logic_test/new_schema_changer +++ b/pkg/sql/logictest/testdata/logic_test/new_schema_changer @@ -781,7 +781,6 @@ DROP DATABASE db1 CASCADE statement ok DROP SCHEMA sc2 CASCADE -skipif config local-mixed-22.2-23.1 # No comments should be left after. query T SELECT comment FROM system.comments ORDER BY comment ASC @@ -967,7 +966,6 @@ CREATE TABLE privs (a INT PRIMARY KEY, b INT) user testuser skipif config local-legacy-schema-changer -skipif config local-mixed-22.2-23.1 statement error must be owner of table privs or have CREATE privilege on table privs CREATE INDEX foo ON privs (b) @@ -1406,14 +1404,9 @@ SET use_declarative_schema_changer = 'unsafe' statement error pgcode 2BP01 cannot drop index "idx" because view "child" depends on it DROP INDEX parent@idx -skipif config local-mixed-22.2-23.1 statement ok EXPLAIN (DDL) DROP INDEX parent@idx CASCADE; -onlyif config local-mixed-22.2-23.1 -statement error cannot explain a statement which is not supported by the declarative schema change -EXPLAIN (DDL) DROP INDEX parent@idx CASCADE; - statement ok SET use_declarative_schema_changer = 'on' @@ -1470,11 +1463,11 @@ subtest create-schema statement ok BEGIN -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE SCHEMA sc -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TT rowsort SHOW SCHEMAS ---- @@ -1485,11 +1478,11 @@ pg_extension node public admin sc root -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok DROP SCHEMA sc -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TT rowsort SHOW SCHEMAS ---- @@ -1528,7 +1521,7 @@ EXPLAIN (DDL) CREATE SEQUENCE sq2 statement ok SET CLUSTER SETTING sql.schema.force_declarative_statements='+CREATE SEQUENCE' -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok EXPLAIN (DDL) CREATE SEQUENCE sq2 @@ -1565,69 +1558,57 @@ statement ok EXPLAIN (DDL) ALTER TABLE t_108870 ALTER PRIMARY KEY USING COLUMNS (j); # Ensure ALTER TABLE with multiple ADD COLUMN, DROP COLUMN, and/or ALTER PK cannot use declarative schema changer. -skipif config local-mixed-22.2-23.1 statement error pgcode 0A000 cannot explain a statement which is not supported by the declarative schema changer EXPLAIN (DDL) ALTER TABLE t_108870 ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i; -skipif config local-mixed-22.2-23.1 statement error pgcode 0A000 cannot explain a statement which is not supported by the declarative schema changer EXPLAIN (DDL) ALTER TABLE t_108870 DROP COLUMN j, ADD COLUMN k INT DEFAULT 30; -skipif config local-mixed-22.2-23.1 statement error pgcode 0A000 cannot explain a statement which is not supported by the declarative schema changer EXPLAIN (DDL) ALTER TABLE t_108870 ADD COLUMN k INT DEFAULT 30, ALTER PRIMARY KEY USING COLUMNS (j); -skipif config local-mixed-22.2-23.1 statement error pgcode 0A000 cannot explain a statement which is not supported by the declarative schema changer EXPLAIN (DDL) ALTER TABLE t_108870 ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i, ADD COLUMN k INT DEFAULT 30; # Ensure we can enable it in declarative schema changer with cluster setting # sql.schema.force_declarative_statements. -skipif config local-mixed-22.2-23.1 statement ok SET CLUSTER SETTING sql.schema.force_declarative_statements='+ALTER TABLE'; statement ok SET use_declarative_schema_changer = 'on'; -skipif config local-mixed-22.2-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i; -skipif config local-mixed-22.2-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 DROP COLUMN j, ADD COLUMN k INT DEFAULT 30; -skipif config local-mixed-22.2-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 ADD COLUMN k INT DEFAULT 30, ALTER PRIMARY KEY USING COLUMNS (j); -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i, ADD COLUMN k INT DEFAULT 30; # Ensure we can also enable it in declarative schema changer with session variable # use_declarative_schema_changer. -skipif config local-mixed-22.2-23.1 statement ok SET CLUSTER SETTING sql.schema.force_declarative_statements=''; statement ok SET use_declarative_schema_changer = 'unsafe_always'; -skipif config local-mixed-22.2-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i; -skipif config local-mixed-22.2-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 DROP COLUMN j, ADD COLUMN k INT DEFAULT 30; -skipif config local-mixed-22.2-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 ADD COLUMN k INT DEFAULT 30, ALTER PRIMARY KEY USING COLUMNS (j); -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok EXPLAIN (DDL) ALTER TABLE t_108870 ALTER PRIMARY KEY USING COLUMNS (j), DROP COLUMN i, ADD COLUMN k INT DEFAULT 30; diff --git a/pkg/sql/logictest/testdata/logic_test/pg_lsn b/pkg/sql/logictest/testdata/logic_test/pg_lsn index f98dd8dd0a37..40432b637482 100644 --- a/pkg/sql/logictest/testdata/logic_test/pg_lsn +++ b/pkg/sql/logictest/testdata/logic_test/pg_lsn @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 query T SELECT 'A01F0/1AAA'::pg_lsn ---- diff --git a/pkg/sql/logictest/testdata/logic_test/plpgsql_cursor b/pkg/sql/logictest/testdata/logic_test/plpgsql_cursor index df0f9079ba08..2fb5691f4afa 100644 --- a/pkg/sql/logictest/testdata/logic_test/plpgsql_cursor +++ b/pkg/sql/logictest/testdata/logic_test/plpgsql_cursor @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE xy (x INT, y INT); INSERT INTO xy VALUES (1, 2), (3, 4); diff --git a/pkg/sql/logictest/testdata/logic_test/procedure b/pkg/sql/logictest/testdata/logic_test/procedure index 151bc492ec18..c50ffa57c5d9 100644 --- a/pkg/sql/logictest/testdata/logic_test/procedure +++ b/pkg/sql/logictest/testdata/logic_test/procedure @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE PROCEDURE p() LANGUAGE SQL AS 'SELECT 1' diff --git a/pkg/sql/logictest/testdata/logic_test/procedure_plpgsql b/pkg/sql/logictest/testdata/logic_test/procedure_plpgsql index 6173f5d3406d..0307f1409f94 100644 --- a/pkg/sql/logictest/testdata/logic_test/procedure_plpgsql +++ b/pkg/sql/logictest/testdata/logic_test/procedure_plpgsql @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE t ( diff --git a/pkg/sql/logictest/testdata/logic_test/procedure_privileges b/pkg/sql/logictest/testdata/logic_test/procedure_privileges index 4431acffb352..3a378a24eb0b 100644 --- a/pkg/sql/logictest/testdata/logic_test/procedure_privileges +++ b/pkg/sql/logictest/testdata/logic_test/procedure_privileges @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 subtest grant_revoke @@ -739,7 +739,6 @@ CALL test.p() statement ok SET ROLE tester -skipif config local-mixed-22.2-23.1 statement error pgcode 42501 user tester does not have EXECUTE privilege on procedure p CALL test.p() diff --git a/pkg/sql/logictest/testdata/logic_test/procedure_schema_change b/pkg/sql/logictest/testdata/logic_test/procedure_schema_change index 87f09fc44498..25e85b0de516 100644 --- a/pkg/sql/logictest/testdata/logic_test/procedure_schema_change +++ b/pkg/sql/logictest/testdata/logic_test/procedure_schema_change @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 subtest alter_procedure_name diff --git a/pkg/sql/logictest/testdata/logic_test/read_committed b/pkg/sql/logictest/testdata/logic_test/read_committed index a4c1e4681e6e..1052028bb8dd 100644 --- a/pkg/sql/logictest/testdata/logic_test/read_committed +++ b/pkg/sql/logictest/testdata/logic_test/read_committed @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok SET CLUSTER SETTING sql.txn.read_committed_syntax.enabled = true diff --git a/pkg/sql/logictest/testdata/logic_test/refcursor b/pkg/sql/logictest/testdata/logic_test/refcursor index 8558b231337c..3b4b94f687c1 100644 --- a/pkg/sql/logictest/testdata/logic_test/refcursor +++ b/pkg/sql/logictest/testdata/logic_test/refcursor @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE xy (x INT, y INT); diff --git a/pkg/sql/logictest/testdata/logic_test/row_level_ttl b/pkg/sql/logictest/testdata/logic_test/row_level_ttl index 96e31281fd0b..599b0d41ab6e 100644 --- a/pkg/sql/logictest/testdata/logic_test/row_level_ttl +++ b/pkg/sql/logictest/testdata/logic_test/row_level_ttl @@ -1074,12 +1074,11 @@ subtest end subtest desc_pk_with_ttl -# TODO(ecwall): remove local-mixed-22.2-23.1 variant in 24.1 -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 statement error non-ascending ordering on PRIMARY KEYs are not supported CREATE TABLE tbl_desc_pk_with_ttl (id INT, id2 INT, PRIMARY KEY (id, id2 DESC)) WITH (ttl_expire_after = '10 minutes') -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE TABLE tbl_desc_pk_with_ttl (id INT, id2 INT, PRIMARY KEY (id, id2 DESC)) WITH (ttl_expire_after = '10 minutes') @@ -1090,12 +1089,11 @@ subtest desc_pk_without_ttl_add_ttl statement ok CREATE TABLE tbl_desc_pk_without_ttl_add_ttl (id INT, id2 INT, PRIMARY KEY (id, id2 DESC)) -# TODO(ecwall): remove local-mixed-22.2-23.1 variant in 24.1 -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 statement error non-ascending ordering on PRIMARY KEYs are not supported ALTER TABLE tbl_desc_pk_without_ttl_add_ttl SET (ttl_expire_after = '10 minutes') -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok ALTER TABLE tbl_desc_pk_without_ttl_add_ttl SET (ttl_expire_after = '10 minutes') @@ -1106,12 +1104,11 @@ subtest asc_pk_alter_desc_pk statement ok CREATE TABLE tbl_asc_pk_alter_desc_pk (id INT, id2 INT, PRIMARY KEY (id, id2)) WITH (ttl_expire_after = '10 minutes') -# TODO(ecwall): remove local-mixed-22.2-23.1 variant in 24.1 -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 statement error non-ascending ordering on PRIMARY KEYs are not supported ALTER TABLE tbl_asc_pk_alter_desc_pk ALTER PRIMARY KEY USING COLUMNS (id, id2 DESC) -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok ALTER TABLE tbl_asc_pk_alter_desc_pk ALTER PRIMARY KEY USING COLUMNS (id, id2 DESC) diff --git a/pkg/sql/logictest/testdata/logic_test/schema_locked b/pkg/sql/logictest/testdata/logic_test/schema_locked index e42bc867b1d4..27d2351078d8 100644 --- a/pkg/sql/logictest/testdata/logic_test/schema_locked +++ b/pkg/sql/logictest/testdata/logic_test/schema_locked @@ -1,6 +1,3 @@ -# "schema_locked" can only be set/reset when the cluster version is at least 23.1 -# LogicTest: !local-mixed-22.2-23.1 - statement ok CREATE TABLE t (i INT PRIMARY KEY) WITH (schema_locked = t); diff --git a/pkg/sql/logictest/testdata/logic_test/schema_locked_in_cluster_before_23_1 b/pkg/sql/logictest/testdata/logic_test/schema_locked_in_cluster_before_23_1 deleted file mode 100644 index 3f00d6dda46e..000000000000 --- a/pkg/sql/logictest/testdata/logic_test/schema_locked_in_cluster_before_23_1 +++ /dev/null @@ -1,29 +0,0 @@ -# "schema_locked" can only be set/reset when the cluster version is at least 23.1 -# This logic test specifically tests that when the cluster version is not at 23.1 -# yet, all attempts to set/reset this storage parameter will be rejected. -# LogicTest: local-mixed-22.2-23.1 - -statement error pgcode 0A000 cannot set/reset storage parameter "schema_locked" until the cluster version is at least 23.1 -CREATE TABLE t (i INT PRIMARY KEY) WITH (schema_locked = t); - -statement error pgcode 0A000 cannot set/reset storage parameter "schema_locked" until the cluster version is at least 23.1 -CREATE TABLE t (i INT PRIMARY KEY) WITH (schema_locked = f); - -statement ok -CREATE TABLE t (i INT PRIMARY KEY); - -statement error pgcode 0A000 cannot set/reset storage parameter "schema_locked" until the cluster version is at least 23.1 -ALTER TABLE t SET (schema_locked = t); - -statement error pgcode 0A000 cannot set/reset storage parameter "schema_locked" until the cluster version is at least 23.1 -ALTER TABLE t SET (schema_locked = f); - -statement error pgcode 0A000 cannot set/reset storage parameter "schema_locked" until the cluster version is at least 23.1 -ALTER TABLE t SET (schema_locked = t, exclude_data_from_backup = t); - -statement error pgcode 0A000 cannot set/reset storage parameter "schema_locked" until the cluster version is at least 23.1 -ALTER TABLE t RESET (schema_locked); - -statement error pgcode 0A000 cannot set/reset storage parameter "schema_locked" until the cluster version is at least 23.1 -ALTER TABLE t RESET (schema_locked, exclude_data_from_backup); - diff --git a/pkg/sql/logictest/testdata/logic_test/select_for_share b/pkg/sql/logictest/testdata/logic_test/select_for_share index 0deafe826539..0ab2b6547c65 100644 --- a/pkg/sql/logictest/testdata/logic_test/select_for_share +++ b/pkg/sql/logictest/testdata/logic_test/select_for_share @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE t(a INT PRIMARY KEY); diff --git a/pkg/sql/logictest/testdata/logic_test/select_for_update b/pkg/sql/logictest/testdata/logic_test/select_for_update index 79c549d292d5..276dc43c0e32 100644 --- a/pkg/sql/logictest/testdata/logic_test/select_for_update +++ b/pkg/sql/logictest/testdata/logic_test/select_for_update @@ -427,7 +427,6 @@ ROLLBACK statement ok BEGIN READ ONLY -skipif config local-mixed-22.2-23.1 statement error cannot execute SELECT FOR SHARE in a read-only transaction SELECT * FROM t FOR SHARE @@ -437,7 +436,6 @@ ROLLBACK statement ok BEGIN READ ONLY -skipif config local-mixed-22.2-23.1 statement error cannot execute SELECT FOR KEY SHARE in a read-only transaction SELECT * FROM t FOR KEY SHARE @@ -496,30 +494,30 @@ user testuser statement ok SET enable_shared_locking_for_serializable = true -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query error pgcode 55P03 could not obtain lock on row \(k\)=\(1\) in t@t_pkey SELECT v, v2 FROM t JOIN t2 USING (k) FOR SHARE FOR SHARE OF t NOWAIT -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query error pgcode 55P03 could not obtain lock on row \(k\)=\(1\) in t@t_pkey SELECT v, v2 FROM t JOIN t2 USING (k) FOR SHARE OF t2 FOR SHARE OF t NOWAIT -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query error pgcode 55P03 could not obtain lock on row \(k\)=\(1\) in t@t_pkey SELECT v, v2 FROM t JOIN t2 USING (k) FOR SHARE NOWAIT FOR SHARE OF t -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query error pgcode 55P03 could not obtain lock on row \(k\)=\(1\) in t@t_pkey SELECT v, v2 FROM t JOIN t2 USING (k) FOR SHARE NOWAIT FOR SHARE OF t2 statement ok SET statement_timeout = '10ms' -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query error pgcode 57014 query execution canceled due to statement timeout SELECT v, v2 FROM t JOIN t2 USING (k) FOR SHARE FOR SHARE OF t2 NOWAIT -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query error pgcode 57014 query execution canceled due to statement timeout SELECT v, v2 FROM t JOIN t2 USING (k) FOR SHARE OF t FOR SHARE OF t2 NOWAIT diff --git a/pkg/sql/logictest/testdata/logic_test/select_for_update_read_committed b/pkg/sql/logictest/testdata/logic_test/select_for_update_read_committed index 3e0a602bafd5..e8b73e4e66bd 100644 --- a/pkg/sql/logictest/testdata/logic_test/select_for_update_read_committed +++ b/pkg/sql/logictest/testdata/logic_test/select_for_update_read_committed @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok SET CLUSTER SETTING sql.txn.read_committed_syntax.enabled = true diff --git a/pkg/sql/logictest/testdata/logic_test/show_create b/pkg/sql/logictest/testdata/logic_test/show_create index fdb2e334dc1d..4526471c12e2 100644 --- a/pkg/sql/logictest/testdata/logic_test/show_create +++ b/pkg/sql/logictest/testdata/logic_test/show_create @@ -205,11 +205,11 @@ CREATE FUNCTION r1() RETURNS INT LANGUAGE SQL AS 'SELECT 1' statement ok CREATE FUNCTION r1(i INT) RETURNS INT LANGUAGE SQL AS 'SELECT 1' -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE r1(s STRING) LANGUAGE SQL AS 'SELECT 1' -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE r1(s STRING, i INT) LANGUAGE SQL AS 'SELECT 1' @@ -235,7 +235,7 @@ r1 CREATE FUNCTION public.r1(IN i INT8) SELECT 1; $$ -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TT SELECT * FROM [SHOW CREATE PROCEDURE r1] ORDER BY 2 ---- @@ -256,14 +256,14 @@ CREATE SCHEMA sc statement ok CREATE FUNCTION sc.r2() RETURNS INT LANGUAGE SQL AS 'SELECT 1' -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE sc.r2(s STRING) LANGUAGE SQL AS 'SELECT 1' statement error pgcode 42883 pq: unknown function: r2() SHOW CREATE FUNCTION r2; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 42883 pq: unknown procedure: r2() SHOW CREATE PROCEDURE r2; @@ -283,7 +283,7 @@ r2 CREATE FUNCTION sc.r2() SELECT 1; $$ -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TT SHOW CREATE PROCEDURE r2 ---- diff --git a/pkg/sql/logictest/testdata/logic_test/show_tenant_fingerprints b/pkg/sql/logictest/testdata/logic_test/show_tenant_fingerprints index 9e94092de34a..57552fb736d6 100644 --- a/pkg/sql/logictest/testdata/logic_test/show_tenant_fingerprints +++ b/pkg/sql/logictest/testdata/logic_test/show_tenant_fingerprints @@ -1,4 +1,4 @@ -# LogicTest: !3node-tenant-default-configs !local-mixed-22.2-23.1 !fakedist !fakedist-vec-off !fakedist-disk +# LogicTest: !3node-tenant-default-configs !fakedist !fakedist-vec-off !fakedist-disk # Because tenant initialization includes data tied to particular # timestamps, we can't easily make an assertion about the "correct" diff --git a/pkg/sql/logictest/testdata/logic_test/span_builtins b/pkg/sql/logictest/testdata/logic_test/span_builtins index 55b8e551243b..8e8ae2c7ca69 100644 --- a/pkg/sql/logictest/testdata/logic_test/span_builtins +++ b/pkg/sql/logictest/testdata/logic_test/span_builtins @@ -1,5 +1,3 @@ -# LogicTest: !local-mixed-22.2-23.1 - ## Tests for span construction/manipulation builtins subtest tenant_span_0_arg diff --git a/pkg/sql/logictest/testdata/logic_test/split_at b/pkg/sql/logictest/testdata/logic_test/split_at index e49d77c5092d..6700c4e724a9 100644 --- a/pkg/sql/logictest/testdata/logic_test/split_at +++ b/pkg/sql/logictest/testdata/logic_test/split_at @@ -1,4 +1,4 @@ -# LogicTest: !3node-tenant-default-configs !local-mixed-22.2-23.1 +# LogicTest: !3node-tenant-default-configs !local-mixed-23.1 # Test formatting of keys in output of SPLIT AT diff --git a/pkg/sql/logictest/testdata/logic_test/system b/pkg/sql/logictest/testdata/logic_test/system index b83310bd6732..5af69abe9266 100644 --- a/pkg/sql/logictest/testdata/logic_test/system +++ b/pkg/sql/logictest/testdata/logic_test/system @@ -9,7 +9,7 @@ test root NULL NULL {} NULL # The test expectations are different on tenants because of # descriptor_id_sq, tenant, tenant_usage, and span_configurations. skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTTT SELECT schema_name, table_name, type, owner, locality FROM [SHOW TABLES FROM system] ORDER BY 2 ---- @@ -127,7 +127,7 @@ public zones table node NULL # The test expectations are different on tenants because of # descriptor_id_sq, tenant, tenant_usage, and span_configurations. skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query I rowsort SELECT id FROM system.descriptor ORDER BY 1 ---- @@ -293,7 +293,6 @@ SHOW COLUMNS FROM system.zones id INT8 false NULL · {primary} false config BYTES true NULL · {primary} false -skipif config local-mixed-22.2-23.1 query TTBTTTB rowsort SHOW COLUMNS FROM system.lease ---- @@ -303,15 +302,6 @@ nodeID INT8 false NULL · {primary} false expiration TIMESTAMP false NULL · {primary} false crdb_region BYTES false NULL · {primary} false -onlyif config local-mixed-22.2-23.1 -query TTBTTTB rowsort -SHOW COLUMNS FROM system.lease ----- -descID INT8 false NULL · {primary} false -version INT8 false NULL · {primary} false -nodeID INT8 false NULL · {primary} false -expiration TIMESTAMP false NULL · {primary} false - query TTBTTTB rowsort SHOW COLUMNS FROM system.eventlog ---- @@ -340,7 +330,6 @@ key STRING false NULL · {primary} false value BYTES true NULL · {primary} false lastUpdated TIMESTAMP false NULL · {primary} false -skipif config local-mixed-22.2-23.1 query TTBTTTB rowsort SHOW COLUMNS FROM system.jobs ---- @@ -357,22 +346,6 @@ num_runs INT8 true NULL · {jobs_run_stats_idx,pri last_run TIMESTAMP true NULL · {jobs_run_stats_idx,primary} false job_type STRING true NULL · {jobs_job_type_idx,primary} false -onlyif config local-mixed-22.2-23.1 -query TTBTTTB rowsort -SHOW COLUMNS FROM system.jobs ----- -id INT8 false unique_rowid() · {jobs_created_by_type_created_by_id_idx,jobs_run_stats_idx,jobs_status_created_idx,primary} false -status STRING false NULL · {jobs_created_by_type_created_by_id_idx,jobs_run_stats_idx,jobs_status_created_idx,primary} false -created TIMESTAMP false now() · {jobs_run_stats_idx,jobs_status_created_idx,primary} false -payload BYTES false NULL · {primary} false -progress BYTES true NULL · {primary} false -created_by_type STRING true NULL · {jobs_created_by_type_created_by_id_idx,primary} false -created_by_id INT8 true NULL · {jobs_created_by_type_created_by_id_idx,primary} false -claim_session_id BYTES true NULL · {jobs_run_stats_idx,primary} false -claim_instance_id INT8 true NULL · {jobs_run_stats_idx,primary} false -num_runs INT8 true NULL · {jobs_run_stats_idx,primary} false -last_run TIMESTAMP true NULL · {jobs_run_stats_idx,primary} false - query TTBTTTB rowsort SHOW COLUMNS FROM system.settings ---- @@ -381,7 +354,6 @@ value STRING false NULL · {primary} false lastUpdated TIMESTAMP false now() · {primary} false valueType STRING true NULL · {primary} false -skipif config local-mixed-22.2-23.1 query TTBTTTB rowsort SHOW COLUMNS FROM system.role_members ---- @@ -391,14 +363,6 @@ isAdmin BOOL false NULL · {primary} role_id OID false NULL · {primary,role_members_role_id_idx,role_members_role_id_member_id_key} false member_id OID false NULL · {primary,role_members_member_id_idx,role_members_role_id_member_id_key} false -onlyif config local-mixed-22.2-23.1 -query TTBTTTB rowsort -SHOW COLUMNS FROM system.role_members ----- -role STRING false NULL · {primary,role_members_member_idx,role_members_role_idx} false -member STRING false NULL · {primary,role_members_member_idx,role_members_role_idx} false -isAdmin BOOL false NULL · {primary} false - # Verify default privileges on system tables. query TTTB rowsort SHOW GRANTS ON DATABASE system @@ -409,7 +373,7 @@ system root CONNECT true # The test expectations are different on tenants because of # descriptor_id_sq, tenant, tenant_usage, and span_configurations. skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTTTTB rowsort SHOW GRANTS ON system.* ---- @@ -1326,7 +1290,6 @@ UPSERT INTO system.settings (name, value) VALUES ('somesetting', 'somevalueother user root -skipif config local-mixed-22.2-23.1 query TTBOO SELECT * from system.role_members ---- diff --git a/pkg/sql/logictest/testdata/logic_test/system_namespace b/pkg/sql/logictest/testdata/logic_test/system_namespace index bec28281d72f..34fc7dd982df 100644 --- a/pkg/sql/logictest/testdata/logic_test/system_namespace +++ b/pkg/sql/logictest/testdata/logic_test/system_namespace @@ -1,5 +1,5 @@ skipif config 3node-tenant-default-configs -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query IITI rowsort SELECT * FROM system.namespace ---- diff --git a/pkg/sql/logictest/testdata/logic_test/tenant b/pkg/sql/logictest/testdata/logic_test/tenant index 5fd4972efa49..fb2993bdeed8 100644 --- a/pkg/sql/logictest/testdata/logic_test/tenant +++ b/pkg/sql/logictest/testdata/logic_test/tenant @@ -1,4 +1,4 @@ -# LogicTest: !3node-tenant-default-configs !local-mixed-22.2-23.1 +# LogicTest: !3node-tenant-default-configs !local-mixed-23.1 query IBIT colnames SELECT id, active, length(info), name FROM system.tenants ORDER BY id diff --git a/pkg/sql/logictest/testdata/logic_test/tenant_builtins b/pkg/sql/logictest/testdata/logic_test/tenant_builtins index 3f2fcaa82892..53fc0670f2df 100644 --- a/pkg/sql/logictest/testdata/logic_test/tenant_builtins +++ b/pkg/sql/logictest/testdata/logic_test/tenant_builtins @@ -1,4 +1,4 @@ -# LogicTest: !3node-tenant-default-configs !local-mixed-22.2-23.1 +# LogicTest: !3node-tenant-default-configs !local-mixed-23.1 query IBIT colnames SELECT id, active, length(info), name FROM system.tenants ORDER BY id diff --git a/pkg/sql/logictest/testdata/logic_test/tsvector b/pkg/sql/logictest/testdata/logic_test/tsvector index 2295e4baacca..5801e7384a2b 100644 --- a/pkg/sql/logictest/testdata/logic_test/tsvector +++ b/pkg/sql/logictest/testdata/logic_test/tsvector @@ -1,5 +1,3 @@ -# LogicTest: !local-mixed-22.2-23.1 - query BB SELECT 'foo:1,2 bar:3'::tsvector @@ 'foo <-> bar'::tsquery, 'foo <-> bar'::tsquery @@ 'foo:1,2 bar:3'::tsvector ---- diff --git a/pkg/sql/logictest/testdata/logic_test/txn b/pkg/sql/logictest/testdata/logic_test/txn index 380f82253dfd..fa3df69e5ea1 100644 --- a/pkg/sql/logictest/testdata/logic_test/txn +++ b/pkg/sql/logictest/testdata/logic_test/txn @@ -216,7 +216,7 @@ BEGIN TRANSACTION statement ok UPDATE kv SET v = 'b' WHERE k in ('a') -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 25001 cannot change the isolation level of a running transaction SET TRANSACTION ISOLATION LEVEL READ COMMITTED @@ -229,7 +229,7 @@ BEGIN TRANSACTION statement ok SELECT * FROM kv LIMIT 1 -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 25001 cannot change the isolation level of a running transaction SET transaction_isolation = 'READ COMMITTED' @@ -319,25 +319,25 @@ BEGIN statement ok SET TRANSACTION ISOLATION LEVEL SNAPSHOT -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- snapshot -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW transaction_isolation ---- snapshot -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- serializable -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query T SHOW transaction_isolation ---- @@ -355,13 +355,13 @@ SET transaction_isolation = 'this is made up' statement ok BEGIN TRANSACTION ISOLATION LEVEL SNAPSHOT -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- snapshot -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- @@ -387,13 +387,13 @@ SET CLUSTER SETTING sql.txn.read_committed_syntax.enabled = true statement ok BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- read committed -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- @@ -411,25 +411,25 @@ serializable statement ok SET transaction_isolation = 'READ COMMITTED' -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- read committed -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- serializable -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW transaction_isolation ---- read committed -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query T SHOW transaction_isolation ---- @@ -732,7 +732,7 @@ SET CLUSTER SETTING sql.txn.snapshot_isolation_syntax.enabled = true statement ok BEGIN TRANSACTION ISOLATION LEVEL SNAPSHOT, PRIORITY LOW -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- @@ -811,7 +811,7 @@ SHOW DEFAULT_TRANSACTION_ISOLATION read committed # SHOW without a transaction should create an auto-transaction with the new default level -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- @@ -901,7 +901,7 @@ COMMIT statement ok BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query T SHOW TRANSACTION ISOLATION LEVEL ---- @@ -1581,7 +1581,7 @@ ROLLBACK statement ok BEGIN TRANSACTION ISOLATION LEVEL READ COMMITTED; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pq: cluster_logical_timestamp\(\): unsupported in READ COMMITTED isolation SELECT cluster_logical_timestamp(); diff --git a/pkg/sql/logictest/testdata/logic_test/udf b/pkg/sql/logictest/testdata/logic_test/udf index a4597e3b52f5..cb7ad2c15592 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf +++ b/pkg/sql/logictest/testdata/logic_test/udf @@ -239,7 +239,7 @@ CREATE FUNCTION f_test_cor(a INT, b INT) RETURNS INT IMMUTABLE LEAKPROOF STRICT statement error pgcode 42723 pq: function "f_test_cor" already exists with same argument types CREATE FUNCTION f_test_cor(a INT, b INT) RETURNS INT IMMUTABLE LANGUAGE SQL AS $$ SELECT 1 $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 42809 cannot change routine kind\nDETAIL: "f_test_cor" is a function CREATE OR REPLACE PROCEDURE f_test_cor(a INT, b INT) LANGUAGE SQL AS $$ SELECT 2 $$; diff --git a/pkg/sql/logictest/testdata/logic_test/udf_delete b/pkg/sql/logictest/testdata/logic_test/udf_delete index 5b1bd1f8d6de..89e9a3f16cb5 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_delete +++ b/pkg/sql/logictest/testdata/logic_test/udf_delete @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE kv ( diff --git a/pkg/sql/logictest/testdata/logic_test/udf_fk b/pkg/sql/logictest/testdata/logic_test/udf_fk index 18c9836ea081..37c332869d5e 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_fk +++ b/pkg/sql/logictest/testdata/logic_test/udf_fk @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 # Disable fast path for some test runs. let $enable_insert_fast_path diff --git a/pkg/sql/logictest/testdata/logic_test/udf_in_column_defaults b/pkg/sql/logictest/testdata/logic_test/udf_in_column_defaults index 26eba17e132b..bf53eb76afda 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_in_column_defaults +++ b/pkg/sql/logictest/testdata/logic_test/udf_in_column_defaults @@ -1,5 +1,3 @@ -# LogicTest: !local-mixed-22.2-23.1 - statement ok CREATE FUNCTION f1() RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$; diff --git a/pkg/sql/logictest/testdata/logic_test/udf_in_constraints b/pkg/sql/logictest/testdata/logic_test/udf_in_constraints index 2b22b24ee57d..6dfd68aa885a 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_in_constraints +++ b/pkg/sql/logictest/testdata/logic_test/udf_in_constraints @@ -1,5 +1,3 @@ -# LogicTest: !local-mixed-22.2-23.1 - statement ok CREATE FUNCTION f1(a INT) RETURNS INT LANGUAGE SQL AS $$ SELECT a + 1 $$; diff --git a/pkg/sql/logictest/testdata/logic_test/udf_insert b/pkg/sql/logictest/testdata/logic_test/udf_insert index c459f2877b49..51c1227a16d3 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_insert +++ b/pkg/sql/logictest/testdata/logic_test/udf_insert @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE t (a INT PRIMARY KEY, b INT DEFAULT 0); diff --git a/pkg/sql/logictest/testdata/logic_test/udf_plpgsql b/pkg/sql/logictest/testdata/logic_test/udf_plpgsql index 35ca62e835ce..6c83c3a4598c 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_plpgsql +++ b/pkg/sql/logictest/testdata/logic_test/udf_plpgsql @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE xy (x INT, y INT); diff --git a/pkg/sql/logictest/testdata/logic_test/udf_privileges b/pkg/sql/logictest/testdata/logic_test/udf_privileges index d929bb4b3764..3057809772cd 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_privileges +++ b/pkg/sql/logictest/testdata/logic_test/udf_privileges @@ -581,7 +581,7 @@ CREATE FUNCTION f_test_show_grants(INT) RETURNS INT LANGUAGE SQL AS $$ SELECT 1 CREATE FUNCTION f_test_show_grants(INT, string, OID) RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$; CREATE USER u_test_show_grants; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE test_priv_p() LANGUAGE SQL AS $$ SELECT 1 $$; @@ -730,15 +730,15 @@ DROP FUNCTION f_test_alter_owner; statement ok DROP USER u_test_owner; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE p() LANGUAGE SQL AS 'SELECT 1' -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 42883 could not find a function named "p" ALTER FUNCTION p OWNER TO root -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok DROP PROCEDURE p @@ -779,11 +779,11 @@ SELECT test.my_add(1,2) statement ok SET ROLE tester -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 42501 user tester does not have EXECUTE privilege on function my_add SELECT test.my_add(1,2) -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 42501 user tester does not have EXECUTE privilege on function my_add SELECT * FROM (VALUES (1), (2)) AS v(i) WHERE i = test.my_add(1,2) diff --git a/pkg/sql/logictest/testdata/logic_test/udf_privileges_mutations b/pkg/sql/logictest/testdata/logic_test/udf_privileges_mutations index ef64fd556bab..17305cdd18f2 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_privileges_mutations +++ b/pkg/sql/logictest/testdata/logic_test/udf_privileges_mutations @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 subtest privileges_mutations diff --git a/pkg/sql/logictest/testdata/logic_test/udf_regressions b/pkg/sql/logictest/testdata/logic_test/udf_regressions index 5d3fc447d5b8..089d195e81ed 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_regressions +++ b/pkg/sql/logictest/testdata/logic_test/udf_regressions @@ -15,13 +15,11 @@ subtest end # Regression test for #93314 subtest regression_93314 -skipif config local-mixed-22.2-23.1 statement ok CREATE TYPE e_93314 AS ENUM ('a', 'b'); CREATE TABLE t_93314 (i INT, e e_93314); INSERT INTO t_93314 VALUES (1, 'a'); -skipif config local-mixed-22.2-23.1 statement ok CREATE OR REPLACE FUNCTION f_93314 () RETURNS t_93314 AS $$ @@ -31,18 +29,15 @@ $$ LIMIT 1; $$ LANGUAGE SQL; -skipif config local-mixed-22.2-23.1 query T SELECT f_93314(); ---- (1,a) -skipif config local-mixed-22.2-23.1 statement ok CREATE TABLE t_93314_alias (i INT, e _e_93314); INSERT INTO t_93314_alias VALUES (1, ARRAY['a', 'b']::_e_93314); -skipif config local-mixed-22.2-23.1 statement ok CREATE OR REPLACE FUNCTION f_93314_alias () RETURNS t_93314_alias AS $$ @@ -52,48 +47,40 @@ $$ LIMIT 1; $$ LANGUAGE SQL; -skipif config local-mixed-22.2-23.1 query T SELECT f_93314_alias(); ---- (1,"{a,b}") -skipif config local-mixed-22.2-23.1 statement ok CREATE TYPE comp_93314 AS (a INT, b INT); CREATE TABLE t_93314_comp (a INT, c comp_93314, FAMILY (a, c)); -skipif config local-mixed-22.2-23.1 statement ok INSERT INTO t_93314_comp VALUES (1, (2,3)); -skipif config local-mixed-22.2-23.1 statement ok CREATE FUNCTION f_93314_comp() RETURNS comp_93314 AS $$ SELECT (1, 2); $$ LANGUAGE SQL; -skipif config local-mixed-22.2-23.1 query T SELECT f_93314_comp() ---- (1,2) -skipif config local-mixed-22.2-23.1 statement ok CREATE FUNCTION f_93314_comp_t() RETURNS t_93314_comp AS $$ SELECT a, c FROM t_93314_comp LIMIT 1; $$ LANGUAGE SQL; -skipif config local-mixed-22.2-23.1 query T SELECT f_93314_comp_t() ---- (1,"(2,3)") -skipif config local-mixed-22.2-23.1 query TTTTTBBBTITTTTT SELECT oid, proname, pronamespace, proowner, prolang, proleakproof, proisstrict, proretset, provolatile, pronargs, prorettype, proargtypes, proargmodes, proargnames, prosrc FROM pg_catalog.pg_proc WHERE proname IN ('f_93314', 'f_93314_alias', 'f_93314_comp', 'f_93314_comp_t') diff --git a/pkg/sql/logictest/testdata/logic_test/udf_schema_change b/pkg/sql/logictest/testdata/logic_test/udf_schema_change index a1d6a326d01f..7d436a08b4f0 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_schema_change +++ b/pkg/sql/logictest/testdata/logic_test/udf_schema_change @@ -55,7 +55,7 @@ CREATE FUNCTION f_test_alter_name_same_in(INT) RETURNS INT LANGUAGE SQL AS $$ SE statement ok CREATE FUNCTION f_test_alter_name_diff_in() RETURNS INT LANGUAGE SQL AS $$ SELECT 1 $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok CREATE PROCEDURE p(INT) LANGUAGE SQL AS 'SELECT 1' @@ -78,7 +78,7 @@ ALTER FUNCTION f_test_alter_name RENAME TO f_test_alter_name statement error pgcode 42723 pq: function f_test_alter_name_same_in\(IN INT8\) already exists in schema "public" ALTER FUNCTION f_test_alter_name RENAME TO f_test_alter_name_same_in -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 42723 pq: procedure p\(IN INT8\) already exists in schema "public" ALTER FUNCTION f_test_alter_name RENAME TO p @@ -132,7 +132,7 @@ CREATE FUNCTION public.f_test_alter_name_diff_in(IN INT8) SELECT 1; $$ -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement ok DROP PROCEDURE p @@ -167,7 +167,7 @@ SELECT get_function_id('public', 'f_test_sc', ARRAY['i']); let $test_alter_sc_f_test_sc SELECT get_function_id('test_alter_sc', 'f_test_sc', ARRAY[]:::STRING[]); -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TTT SELECT oid, proname, prosrc FROM pg_catalog.pg_proc WHERE proname IN ('f_test_sc') @@ -179,7 +179,7 @@ ORDER BY oid # TODO(mgartner): Remove this test when when this mixed version configuration is # removed. -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query TTT SELECT oid, proname, prosrc FROM pg_catalog.pg_proc WHERE proname IN ('f_test_sc') @@ -189,7 +189,7 @@ ORDER BY oid 100113 f_test_sc SELECT 2; 100115 f_test_sc SELECT 3; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TT WITH fns AS ( SELECT crdb_internal.pb_to_json( @@ -215,7 +215,7 @@ SELECT fn->>'id' AS id, fn->'parentSchemaId' # TODO(mgartner): Remove this test when when this mixed version configuration is # removed. -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query TT WITH fns AS ( SELECT crdb_internal.pb_to_json( @@ -252,7 +252,7 @@ ALTER PROCEDURE f_test_sc(INT) SET SCHEMA test_alter_sc; statement ok ALTER FUNCTION f_test_sc(INT) SET SCHEMA public; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 query TT WITH fns AS ( SELECT crdb_internal.pb_to_json( @@ -278,7 +278,7 @@ SELECT fn->>'id' AS id, fn->'parentSchemaId' # TODO(mgartner): Remove this test when when this mixed version configuration is # removed. -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query TT WITH fns AS ( SELECT crdb_internal.pb_to_json( @@ -329,7 +329,7 @@ $$ statement ok ALTER FUNCTION f_test_sc(INT) SET SCHEMA test_alter_sc; -skip config local-mixed-22.2-23.1 +skip config local-mixed-23.1 query TT WITH fns AS ( SELECT crdb_internal.pb_to_json( @@ -355,7 +355,7 @@ SELECT fn->>'id' AS id, fn->'parentSchemaId' # TODO(mgartner): Remove this test when when this mixed version configuration is # removed. -onlyif config local-mixed-22.2-23.1 +onlyif config local-mixed-23.1 query TT WITH fns AS ( SELECT crdb_internal.pb_to_json( diff --git a/pkg/sql/logictest/testdata/logic_test/udf_update b/pkg/sql/logictest/testdata/logic_test/udf_update index 98fa67804907..67ba6148a42c 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_update +++ b/pkg/sql/logictest/testdata/logic_test/udf_update @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok CREATE TABLE t (a INT PRIMARY KEY, b INT); diff --git a/pkg/sql/logictest/testdata/logic_test/udf_upsert b/pkg/sql/logictest/testdata/logic_test/udf_upsert index 94318b662c5d..ac4ac8efa746 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_upsert +++ b/pkg/sql/logictest/testdata/logic_test/udf_upsert @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 subtest on_conflict_do_nothing diff --git a/pkg/sql/logictest/testdata/logic_test/udf_volatility_check b/pkg/sql/logictest/testdata/logic_test/udf_volatility_check index 123650b287d3..fb1e772897e1 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_volatility_check +++ b/pkg/sql/logictest/testdata/logic_test/udf_volatility_check @@ -106,27 +106,27 @@ subtest end subtest plpgsql_volatility -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 22023 pq: referencing relations is not allowed in immutable function CREATE FUNCTION f() RETURNS FLOAT LANGUAGE PLpgSQL IMMUTABLE AS $$ BEGIN RETURN (SELECT a FROM t1); END $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 22023 pq: volatile statement not allowed in immutable function: BEGIN CREATE FUNCTION f() RETURNS FLOAT LANGUAGE PLpgSQL IMMUTABLE AS $$ BEGIN RETURN (SELECT random()); END $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 22023 pq: stable statement not allowed in immutable function: BEGIN CREATE FUNCTION f() RETURNS TIMESTAMP LANGUAGE PLpgSQL IMMUTABLE AS $$ BEGIN RETURN (SELECT statement_timestamp()); END $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 22023 pq: volatile statement not allowed in stable function: BEGIN CREATE FUNCTION f() RETURNS FLOAT LANGUAGE PLpgSQL STABLE AS $$ BEGIN RETURN (SELECT random()); END $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 22023 pq: volatile statement not allowed in immutable function: BEGIN CREATE FUNCTION f() RETURNS FLOAT LANGUAGE PLpgSQL IMMUTABLE AS $$ BEGIN RETURN (SELECT @1 FROM random()); END $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 22023 pq: volatile statement not allowed in immutable function: BEGIN CREATE FUNCTION f() RETURNS INT LANGUAGE PLpgSQL IMMUTABLE AS $$ BEGIN @@ -134,7 +134,7 @@ CREATE FUNCTION f() RETURNS INT LANGUAGE PLpgSQL IMMUTABLE AS $$ END $$; -skipif config local-mixed-22.2-23.1 +skipif config local-mixed-23.1 statement error pgcode 22023 pq: volatile statement not allowed in immutable function: BEGIN CREATE FUNCTION f() RETURNS INT LANGUAGE PLpgSQL IMMUTABLE AS $$ BEGIN diff --git a/pkg/sql/logictest/testdata/logic_test/unique_read_committed b/pkg/sql/logictest/testdata/logic_test/unique_read_committed index 0478eada7920..751bd90b28dd 100644 --- a/pkg/sql/logictest/testdata/logic_test/unique_read_committed +++ b/pkg/sql/logictest/testdata/logic_test/unique_read_committed @@ -1,4 +1,4 @@ -# LogicTest: !local-mixed-22.2-23.1 +# LogicTest: !local-mixed-23.1 statement ok SET CLUSTER SETTING sql.txn.read_committed_syntax.enabled = true diff --git a/pkg/sql/logictest/testdata/logic_test/zone_config_system_tenant b/pkg/sql/logictest/testdata/logic_test/zone_config_system_tenant index 2831a335edee..1b265fbb9f8e 100644 --- a/pkg/sql/logictest/testdata/logic_test/zone_config_system_tenant +++ b/pkg/sql/logictest/testdata/logic_test/zone_config_system_tenant @@ -21,7 +21,6 @@ CREATE TABLE a(id INT PRIMARY KEY) statement error OSS binaries do not include enterprise features ALTER TABLE a CONFIGURE ZONE USING global_reads = true -skipif config local-mixed-22.2-23.1 query IT SELECT zone_id, target FROM crdb_internal.zones ORDER BY 1 ---- diff --git a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/logictest/tests/local-mixed-23.1/BUILD.bazel similarity index 95% rename from pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel rename to pkg/sql/logictest/tests/local-mixed-23.1/BUILD.bazel index 37c5e2480453..39dc155f2126 100644 --- a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/logictest/tests/local-mixed-23.1/BUILD.bazel @@ -1,7 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( - name = "local-mixed-22_2-23_1_test", + name = "local-mixed-23_1_test", size = "enormous", srcs = ["generated_test.go"], args = select({ diff --git a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/generated_test.go b/pkg/sql/logictest/tests/local-mixed-23.1/generated_test.go similarity index 97% rename from pkg/sql/logictest/tests/local-mixed-22.2-23.1/generated_test.go rename to pkg/sql/logictest/tests/local-mixed-23.1/generated_test.go index b7809bf6ef74..e3867eba429c 100644 --- a/pkg/sql/logictest/tests/local-mixed-22.2-23.1/generated_test.go +++ b/pkg/sql/logictest/tests/local-mixed-23.1/generated_test.go @@ -10,7 +10,7 @@ // Code generated by generate-logictest, DO NOT EDIT. -package testlocal_mixed_222_231 +package testlocal_mixed_231 import ( "os" @@ -414,6 +414,13 @@ func TestLogic_comment_on( runLogicTest(t, "comment_on") } +func TestLogic_composite_types( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "composite_types") +} + func TestLogic_computed( t *testing.T, ) { @@ -736,6 +743,13 @@ func TestLogic_errors( runLogicTest(t, "errors") } +func TestLogic_event_log( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "event_log") +} + func TestLogic_exclude_data_from_backup( t *testing.T, ) { @@ -785,6 +799,13 @@ func TestLogic_fk( runLogicTest(t, "fk") } +func TestLogic_fk_read_committed( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "fk_read_committed") +} + func TestLogic_float( t *testing.T, ) { @@ -932,6 +953,13 @@ func TestLogic_hash_sharded_index( runLogicTest(t, "hash_sharded_index") } +func TestLogic_hash_sharded_index_read_committed( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "hash_sharded_index_read_committed") +} + func TestLogic_hidden_columns( t *testing.T, ) { @@ -1569,11 +1597,11 @@ func TestLogic_schema_change_retry( runLogicTest(t, "schema_change_retry") } -func TestLogic_schema_locked_in_cluster_before_23_1( +func TestLogic_schema_locked( t *testing.T, ) { defer leaktest.AfterTest(t)() - runLogicTest(t, "schema_locked_in_cluster_before_23_1") + runLogicTest(t, "schema_locked") } func TestLogic_schema_repair( @@ -1800,6 +1828,13 @@ func TestLogic_show_indexes( runLogicTest(t, "show_indexes") } +func TestLogic_show_tenant_fingerprints( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "show_tenant_fingerprints") +} + func TestLogic_show_transfer_state( t *testing.T, ) { @@ -1814,6 +1849,13 @@ func TestLogic_show_var( runLogicTest(t, "show_var") } +func TestLogic_span_builtins( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "span_builtins") +} + func TestLogic_sqllite( t *testing.T, ) { @@ -2003,6 +2045,13 @@ func TestLogic_truncate_with_concurrent_mutation( runLogicTest(t, "truncate_with_concurrent_mutation") } +func TestLogic_tsvector( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "tsvector") +} + func TestLogic_tuple( t *testing.T, ) { @@ -2066,6 +2115,20 @@ func TestLogic_udf( runLogicTest(t, "udf") } +func TestLogic_udf_in_column_defaults( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "udf_in_column_defaults") +} + +func TestLogic_udf_in_constraints( + t *testing.T, +) { + defer leaktest.AfterTest(t)() + runLogicTest(t, "udf_in_constraints") +} + func TestLogic_udf_observability( t *testing.T, ) { diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1/BUILD.bazel similarity index 95% rename from pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel rename to pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1/BUILD.bazel index 5e41ab67671d..6d129cc37942 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1/BUILD.bazel @@ -1,7 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( - name = "local-mixed-22_2-23_1_test", + name = "local-mixed-23_1_test", size = "enormous", srcs = ["generated_test.go"], args = select({ diff --git a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/generated_test.go b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1/generated_test.go similarity index 99% rename from pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/generated_test.go rename to pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1/generated_test.go index bb1e4259b012..34d0622daaf7 100644 --- a/pkg/sql/opt/exec/execbuilder/tests/local-mixed-22.2-23.1/generated_test.go +++ b/pkg/sql/opt/exec/execbuilder/tests/local-mixed-23.1/generated_test.go @@ -10,7 +10,7 @@ // Code generated by generate-logictest, DO NOT EDIT. -package testlocal_mixed_222_231 +package testlocal_mixed_231 import ( "os" diff --git a/pkg/sql/schemachanger/sctest/backup.go b/pkg/sql/schemachanger/sctest/backup.go index ce40fd50e3a0..1e6ba64f2de3 100644 --- a/pkg/sql/schemachanger/sctest/backup.go +++ b/pkg/sql/schemachanger/sctest/backup.go @@ -71,6 +71,7 @@ func BackupSuccessMixedVersion(t *testing.T, path string, factory TestServerFact // These tests are only marginally more useful than BackupSuccess // and at least as expensive to run. skip.UnderShort(t) + skip.WithIssue(t, 112208) factory = factory.WithMixedVersion() cumulativeTestForEachPostCommitStage(t, path, factory, func(t *testing.T, cs CumulativeTestCaseSpec) { @@ -87,6 +88,7 @@ func BackupRollbacksMixedVersion(t *testing.T, path string, factory TestServerFa // These tests are only marginally more useful than BackupSuccess // and at least as expensive to run. skip.UnderShort(t) + skip.WithIssue(t, 112208) factory = factory.WithMixedVersion() cumulativeTestForEachPostCommitStage(t, path, factory, func(t *testing.T, cs CumulativeTestCaseSpec) { diff --git a/pkg/sql/sqlinstance/instancestorage/BUILD.bazel b/pkg/sql/sqlinstance/instancestorage/BUILD.bazel index d33e5710a138..80d2d7ab7f51 100644 --- a/pkg/sql/sqlinstance/instancestorage/BUILD.bazel +++ b/pkg/sql/sqlinstance/instancestorage/BUILD.bazel @@ -64,7 +64,6 @@ go_test( embed = [":instancestorage"], deps = [ "//pkg/base", - "//pkg/clusterversion", "//pkg/keys", "//pkg/kv", "//pkg/kv/kvclient/kvtenant", @@ -75,7 +74,6 @@ go_test( "//pkg/security/securitytest", "//pkg/server", "//pkg/server/settingswatcher", - "//pkg/settings/cluster", "//pkg/sql/catalog/descs", "//pkg/sql/catalog/desctestutils", "//pkg/sql/catalog/systemschema", diff --git a/pkg/sql/sqlinstance/instancestorage/instancecache_test.go b/pkg/sql/sqlinstance/instancestorage/instancecache_test.go index 18adeec0be80..a9942408aba0 100644 --- a/pkg/sql/sqlinstance/instancestorage/instancecache_test.go +++ b/pkg/sql/sqlinstance/instancestorage/instancecache_test.go @@ -16,11 +16,9 @@ import ( "time" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/kv/kvclient/rangefeed" "github.com/cockroachdb/cockroach/pkg/server/settingswatcher" - "github.com/cockroachdb/cockroach/pkg/settings/cluster" "github.com/cockroachdb/cockroach/pkg/sql/catalog/desctestutils" "github.com/cockroachdb/cockroach/pkg/sql/enum" "github.com/cockroachdb/cockroach/pkg/sql/sqlliveness/slstorage" @@ -29,7 +27,6 @@ import ( "github.com/cockroachdb/cockroach/pkg/util/grpcutil" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/cockroachdb/cockroach/pkg/util/stop" "github.com/stretchr/testify/require" ) @@ -122,141 +119,3 @@ func TestRangeFeed(t *testing.T) { require.ErrorIs(t, err, ctx.Err()) }) } - -func TestMigrationCache(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - ctx := context.Background() - - makeVersion := func(key clusterversion.Key) clusterversion.ClusterVersion { - return clusterversion.ClusterVersion{ - Version: clusterversion.ByKey(key), - } - } - - makeCache := func(id int) instanceCache { - return &singletonInstanceFeed{instance: instancerow{ - instanceID: base.SQLInstanceID(id), - }} - } - - requireCache := func(t *testing.T, expectedID int, cache instanceCache) { - _, ok := cache.getInstance(base.SQLInstanceID(expectedID)) - require.True(t, ok, "expected %v to contain instance id %d", cache, expectedID) - } - - waitForIdle := func(t *testing.T, s *stop.Stopper) { - require.Eventually( - t, - func() bool { - return s.NumTasks() == 0 - }, - 30*time.Second, - 10*time.Millisecond, - "waiting for stopper to have no active tasks", - ) - } - - t.Run("setting_changed_before_initialization", func(t *testing.T) { - stopper := stop.NewStopper() - defer stopper.Stop(ctx) - - settings := cluster.MakeClusterSettings() - require.NoError(t, settings.Version.SetActiveVersion(ctx, makeVersion(clusterversion.V23_1_SystemRbrReadNew))) - - oldCache := 1 - newCache := 2 - - cache, err := newMigrationCache( - context.Background(), - stopper, - settings, - func(ctx context.Context) (instanceCache, error) { - return makeCache(oldCache), nil - }, - func(ctx context.Context) (instanceCache, error) { - return makeCache(newCache), nil - }) - - require.NoError(t, err) - requireCache(t, newCache, cache) - }) - - t.Run("setting_changed_after_initialization", func(t *testing.T) { - stopper := stop.NewStopper() - defer stopper.Stop(ctx) - - settings := cluster.MakeClusterSettings() - require.NoError(t, settings.Version.SetActiveVersion(ctx, makeVersion(clusterversion.V22_2))) - - oldCache := 1 - newCache := 2 - - cache, err := newMigrationCache( - context.Background(), - stopper, - settings, - func(ctx context.Context) (instanceCache, error) { - return makeCache(oldCache), nil - }, - func(ctx context.Context) (instanceCache, error) { - return makeCache(newCache), nil - }) - - require.NoError(t, err) - waitForIdle(t, stopper) - requireCache(t, oldCache, cache) - - // At this point we should still be using the old cache - require.NoError(t, settings.Version.SetActiveVersion(ctx, makeVersion(clusterversion.V23_1_SystemRbrDualWrite))) - waitForIdle(t, stopper) - requireCache(t, oldCache, cache) - - // At this point we should be using the new cache - require.NoError(t, settings.Version.SetActiveVersion(ctx, makeVersion(clusterversion.V23_1_SystemRbrReadNew))) - time.Sleep(time.Second) - waitForIdle(t, stopper) - requireCache(t, newCache, cache) - }) - - t.Run("setting_changed_during_initialization", func(t *testing.T) { - stopper := stop.NewStopper() - defer stopper.Stop(ctx) - - start := make(chan struct{}) - block := make(chan struct{}) - - settings := cluster.MakeClusterSettings() - require.NoError(t, settings.Version.SetActiveVersion(ctx, makeVersion(clusterversion.V22_2))) - - oldCache := 1 - newCache := 2 - - go func() { - <-start - require.NoError(t, settings.Version.SetActiveVersion(ctx, makeVersion(clusterversion.V23_1_SystemRbrReadNew))) - }() - - cache, err := newMigrationCache( - context.Background(), - stopper, - settings, - func(ctx context.Context) (instanceCache, error) { - close(start) - <-block - return makeCache(oldCache), nil - }, - func(ctx context.Context) (instanceCache, error) { - return makeCache(newCache), nil - }) - - require.NoError(t, err) - requireCache(t, newCache, cache) - - close(block) - waitForIdle(t, stopper) - - requireCache(t, newCache, cache) - }) -} diff --git a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel b/pkg/sql/sqlitelogictest/tests/local-mixed-23.1/BUILD.bazel similarity index 95% rename from pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel rename to pkg/sql/sqlitelogictest/tests/local-mixed-23.1/BUILD.bazel index 643e88cfbe65..a11e839c6f74 100644 --- a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/BUILD.bazel +++ b/pkg/sql/sqlitelogictest/tests/local-mixed-23.1/BUILD.bazel @@ -1,7 +1,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test") go_test( - name = "local-mixed-22_2-23_1_test", + name = "local-mixed-23_1_test", size = "enormous", srcs = ["generated_test.go"], args = ["-test.timeout=7195s"], diff --git a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/generated_test.go b/pkg/sql/sqlitelogictest/tests/local-mixed-23.1/generated_test.go similarity index 99% rename from pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/generated_test.go rename to pkg/sql/sqlitelogictest/tests/local-mixed-23.1/generated_test.go index a7260fba7732..c0800a7f0e76 100644 --- a/pkg/sql/sqlitelogictest/tests/local-mixed-22.2-23.1/generated_test.go +++ b/pkg/sql/sqlitelogictest/tests/local-mixed-23.1/generated_test.go @@ -10,7 +10,7 @@ // Code generated by generate-logictest, DO NOT EDIT. -package testlocal_mixed_222_231 +package testlocal_mixed_231 import ( "flag" diff --git a/pkg/sql/tenant_creation.go b/pkg/sql/tenant_creation.go index f39ada496412..41407dae55f9 100644 --- a/pkg/sql/tenant_creation.go +++ b/pkg/sql/tenant_creation.go @@ -47,7 +47,7 @@ import ( ) const ( - tenantCreationMinSupportedVersionKey = clusterversion.V22_2 + tenantCreationMinSupportedVersionKey = clusterversion.BinaryMinSupportedVersionKey ) // CreateTenant implements the tree.TenantOperator interface. diff --git a/pkg/sql/tenant_test.go b/pkg/sql/tenant_test.go index c68c8413f4e7..8adcd1fa4325 100644 --- a/pkg/sql/tenant_test.go +++ b/pkg/sql/tenant_test.go @@ -13,7 +13,6 @@ package sql_test import ( "context" gosql "database/sql" - "fmt" "testing" "github.com/cockroachdb/cockroach/pkg/base" @@ -51,7 +50,7 @@ func TestDropTenantSynchronous(t *testing.T) { Knobs: base.TestingKnobs{ Server: &server.TestingKnobs{ DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V22_2), + BinaryVersionOverride: clusterversion.ByKey(clusterversion.BinaryMinSupportedVersionKey), }, }, }, @@ -131,26 +130,3 @@ func TestGetTenantIds(t *testing.T) { } require.Equal(t, expectedIds, ids) } - -func TestAlterTenantCapabilityMixedVersion22_2_23_1(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V22_2), - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - systemTenant := sqlutils.MakeSQLRunner(tc.ServerConn(0)) - - const tenantID = 5 - systemTenant.Exec(t, fmt.Sprintf("SELECT crdb_internal.create_tenant(%d)", tenantID)) - systemTenant.ExpectErr(t, "cannot alter tenant capabilities until version is finalized", "ALTER TENANT $1 GRANT CAPABILITY can_admin_split", tenantID) -} diff --git a/pkg/storage/min_version_test.go b/pkg/storage/min_version_test.go index 2bd12c8bb53a..ed3c2333fee9 100644 --- a/pkg/storage/min_version_test.go +++ b/pkg/storage/min_version_test.go @@ -100,14 +100,14 @@ func TestSetMinVersion(t *testing.T) { p, err := Open(context.Background(), InMemory(), cluster.MakeClusterSettings(), CacheSize(0)) require.NoError(t, err) defer p.Close() - require.Equal(t, pebble.FormatPrePebblev1Marked, p.db.FormatMajorVersion()) + require.Equal(t, pebble.FormatFlushableIngest, p.db.FormatMajorVersion()) ValueBlocksEnabled.Override(context.Background(), &st.SV, true) - // Advancing the store cluster version to one that supports value blocks + // Advancing the store cluster version to one that supports a new feature // should also advance the store's format major version. - err = p.SetMinVersion(clusterversion.ByKey(clusterversion.V23_1EnablePebbleFormatSSTableValueBlocks)) + err = p.SetMinVersion(clusterversion.ByKey(clusterversion.V23_2_PebbleFormatDeleteSizedAndObsolete)) require.NoError(t, err) - require.Equal(t, pebble.FormatSSTableValueBlocks, p.db.FormatMajorVersion()) + require.Equal(t, pebble.FormatDeleteSizedAndObsolete, p.db.FormatMajorVersion()) } func TestMinVersion_IsNotEncrypted(t *testing.T) { diff --git a/pkg/storage/sst_writer_test.go b/pkg/storage/sst_writer_test.go index e64e02680fe3..8e69680bca35 100644 --- a/pkg/storage/sst_writer_test.go +++ b/pkg/storage/sst_writer_test.go @@ -15,7 +15,6 @@ import ( "math/rand" "testing" - "github.com/cockroachdb/cockroach/pkg/clusterversion" "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/settings/cluster" @@ -83,28 +82,6 @@ func TestMakeIngestionWriterOptions(t *testing.T) { st *cluster.Settings want sstable.TableFormat }{ - { - name: "22.2", - st: cluster.MakeTestingClusterSettingsWithVersions( - clusterversion.ByKey(clusterversion.V22_2), - clusterversion.TestingBinaryMinSupportedVersion, - true, - ), - want: sstable.TableFormatPebblev2, - }, - { - name: "with value blocks", - st: func() *cluster.Settings { - st := cluster.MakeTestingClusterSettingsWithVersions( - clusterversion.ByKey(clusterversion.V23_1EnablePebbleFormatSSTableValueBlocks), - clusterversion.TestingBinaryMinSupportedVersion, - true, - ) - ValueBlocksEnabled.Override(context.Background(), &st.SV, true) - return st - }(), - want: sstable.TableFormatPebblev3, - }, { name: "with virtual sstables", st: func() *cluster.Settings { diff --git a/pkg/upgrade/upgrademanager/manager_external_test.go b/pkg/upgrade/upgrademanager/manager_external_test.go index ffe95a166578..a887473b58ce 100644 --- a/pkg/upgrade/upgrademanager/manager_external_test.go +++ b/pkg/upgrade/upgrademanager/manager_external_test.go @@ -66,12 +66,7 @@ func TestAlreadyRunningJobsAreHandledProperly(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) - // clusterversion.V23_1StopWritingPayloadAndProgressToSystemJobs was chosen - // specifically so that all the migrations that introduce and backfill the new - // `system.job_info` have run by this point. In the future this startCV should - // be changed to V23_2Start and updated to the next Start key everytime the - // compatability window moves forward. - startCV := clusterversion.V23_1StopWritingPayloadAndProgressToSystemJobs + startCV := clusterversion.VCurrent_Start endCV := startCV + 1 ch := make(chan chan error) @@ -251,7 +246,7 @@ func TestPostJobInfoTableQueryDuplicateJobInfo(t *testing.T) { defer log.Scope(t).Close(t) ctx := context.Background() - targetCV := clusterversion.V23_1StopWritingPayloadAndProgressToSystemJobs + 1 + targetCV := clusterversion.V23_2Start + 1 targetCVJSON, err := protoreflect.MessageToJSON(&clusterversion.ClusterVersion{Version: clusterversion.ByKey(targetCV)}, protoreflect.FmtFlags{EmitDefaults: false}) require.NoError(t, err) @@ -372,7 +367,7 @@ func TestMigrateUpdatesReplicaVersion(t *testing.T) { defer log.Scope(t).Close(t) // We're going to be migrating from startCV to endCV. - startCVKey := clusterversion.V22_2 + startCVKey := clusterversion.V23_1 startCV := clusterversion.ByKey(startCVKey) endCVKey := startCVKey + 1 endCV := clusterversion.ByKey(endCVKey) @@ -561,12 +556,7 @@ func TestPauseMigration(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) - // clusterversion.V23_1StopWritingPayloadAndProgressToSystemJobs was chosen - // specifically so that all the migrations that introduce and backfill the new - // `system.job_info` have run by this point. In the future this startCV should - // be changed to V23_2Start and updated to the next Start key everytime the - // compatability window moves forward. - startCV := clusterversion.V23_1StopWritingPayloadAndProgressToSystemJobs + startCV := clusterversion.VCurrent_Start endCV := startCV + 1 type migrationEvent struct { diff --git a/pkg/upgrade/upgrades/BUILD.bazel b/pkg/upgrade/upgrades/BUILD.bazel index 98b78b037d51..f0de18c35fd1 100644 --- a/pkg/upgrade/upgrades/BUILD.bazel +++ b/pkg/upgrade/upgrades/BUILD.bazel @@ -99,49 +99,24 @@ go_test( name = "upgrades_test", size = "large", srcs = [ - "alter_jobs_add_job_type_test.go", - "alter_sql_instances_binary_version_test.go", - "alter_sql_instances_sql_addr_test.go", - "alter_table_statistics_partial_predicate_and_id_test.go", - "backfill_job_info_table_migration_test.go", "builtins_test.go", - "create_auto_config_runner_job_test.go", - "create_computed_indexes_sql_statistics_test.go", - "create_index_usage_statement_statistics_test.go", "create_jobs_metrics_polling_job_test.go", "create_region_liveness_test.go", - "create_task_system_tables_test.go", - "database_role_settings_table_user_id_migration_test.go", - "delete_descriptors_of_dropped_functions_test.go", - "desc_id_sequence_for_system_tenant_test.go", "descriptor_utils_test.go", "ensure_sql_schema_telemetry_schedule_test.go", - "external_connections_table_user_id_migration_test.go", "first_upgrade_test.go", "grant_execute_to_public_test.go", "helpers_test.go", - "json_forward_indexes_test.go", - "key_visualizer_migration_test.go", "main_test.go", "mvcc_statistics_migration_test.go", "plan_gist_stmt_diagnostics_requests_test.go", - "role_members_ids_migration_test.go", "schema_changes_external_test.go", "schema_changes_helpers_test.go", - "schemachanger_elements_test.go", "sql_stats_ttl_test.go", "system_activity_update_job_test.go", "system_exec_insights_test.go", - "system_job_info_test.go", - "system_privileges_index_migration_test.go", - "system_privileges_user_id_migration_test.go", "system_rbr_indexes_test.go", - "system_statistics_activity_test.go", - "tenant_id_sequence_for_system_tenant_test.go", - "tenant_table_migration_test.go", "upgrades_test.go", - "wait_for_del_range_in_gc_job_test.go", - "web_sessions_table_user_id_migration_test.go", ], args = ["-test.timeout=895s"], data = glob(["testdata/**"]), @@ -149,9 +124,6 @@ go_test( shard_count = 16, deps = [ "//pkg/base", - "//pkg/ccl/backupccl", - "//pkg/ccl/changefeedccl", - "//pkg/cloud/userfile", "//pkg/clusterversion", "//pkg/jobs", "//pkg/jobs/jobspb", @@ -165,7 +137,6 @@ go_test( "//pkg/security/username", "//pkg/server", "//pkg/settings/cluster", - "//pkg/spanconfig", "//pkg/sql", "//pkg/sql/catalog", "//pkg/sql/catalog/catalogkeys", @@ -184,15 +155,10 @@ go_test( "//pkg/sql/enum", "//pkg/sql/isql", "//pkg/sql/privilege", - "//pkg/sql/schemachanger/scexec", - "//pkg/sql/schemachanger/scop", - "//pkg/sql/schemachanger/scplan", "//pkg/sql/sem/builtins/builtinconstants", "//pkg/sql/sem/catid", - "//pkg/sql/sem/eval", "//pkg/sql/sem/tree", "//pkg/sql/types", - "//pkg/storage", "//pkg/testutils", "//pkg/testutils/serverutils", "//pkg/testutils/skip", @@ -200,11 +166,8 @@ go_test( "//pkg/testutils/testcluster", "//pkg/upgrade", "//pkg/upgrade/upgradebase", - "//pkg/util", - "//pkg/util/ctxgroup", "//pkg/util/encoding", "//pkg/util/hlc", - "//pkg/util/intsets", "//pkg/util/leaktest", "//pkg/util/log", "//pkg/util/protoutil", diff --git a/pkg/upgrade/upgrades/alter_jobs_add_job_type_test.go b/pkg/upgrade/upgrades/alter_jobs_add_job_type_test.go deleted file mode 100644 index 8c56a6ecf051..000000000000 --- a/pkg/upgrade/upgrades/alter_jobs_add_job_type_test.go +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "fmt" - "strings" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/jobs" - "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/intsets" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -var _ jobs.Resumer = &fakeResumer{} - -type fakeResumer struct { -} - -// Resume implements the jobs.Resumer interface. -func (*fakeResumer) Resume(ctx context.Context, execCtx interface{}) error { - return nil -} - -// OnFailOrCancel implements the jobs.Resumer interface. -func (*fakeResumer) OnFailOrCancel(ctx context.Context, execCtx interface{}, jobErr error) error { - return jobErr -} - -// CollectProfile implements the jobs.Resumer interface. -func (*fakeResumer) CollectProfile(_ context.Context, _ interface{}) error { - return nil -} - -// TestCreateAdoptableJobPopulatesJobType verifies that the job_type column in system.jobs is populated -// by CreateAdoptableJobWithTxn after upgrading to V23_1AddTypeColumnToJobsTable. -func TestCreateAdoptableJobPopulatesJobType(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1AddTypeColumnToJobsTable), - }, - }, - }, - } - - var ( - ctx = context.Background() - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - record := jobs.Record{ - Description: "fake job", - Username: username.TestUserName(), - Details: jobspb.ImportDetails{}, - Progress: jobspb.ImportProgress{}, - } - - j, err := s.JobRegistry().(*jobs.Registry).CreateAdoptableJobWithTxn(ctx, record, 0, nil) - require.NoError(t, err) - runner := sqlutils.MakeSQLRunner(sqlDB) - runner.CheckQueryResults(t, fmt.Sprintf("SELECT job_type from system.jobs WHERE id = %d", j.ID()), [][]string{{"IMPORT"}}) -} - -// TestAlterSystemJobsTableAddJobTypeColumn verifies that the migrations that add & backfill -// the type column to system.jobs succeed. -func TestAlterSystemJobsTableAddJobTypeColumn(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - // Set a small batch size so the migration uses more than one batch for testing. - // Reset it after the test completes. - prev := upgrades.JobsBackfillBatchSize_22_2_20 - upgrades.JobsBackfillBatchSize_22_2_20 = 2 - defer func() { - upgrades.JobsBackfillBatchSize_22_2_20 = prev - }() - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1AddTypeColumnToJobsTable - 1), - }, - }, - }, - } - - var ( - ctx = context.Background() - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var ( - validationSchemas = []upgrades.Schema{ - {Name: "job_type", ValidationFn: upgrades.HasColumn}, - {Name: "fam_0_id_status_created_payload", ValidationFn: upgrades.HasColumnFamily}, - {Name: "jobs_job_type_idx", ValidationFn: upgrades.HasIndex}, - } - ) - - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.JobsTableID, - systemschema.JobsTable, - []string{}, - validationSchemas, - false, /* expectExists */ - ) - - // Start a job of each type. - registry := s.JobRegistry().(*jobs.Registry) - jobspb.ForEachType(func(typ jobspb.Type) { - // The upgrade creates migration and schemachange jobs, so we do not - // need to create more. We should not override resumers for these job types, - // otherwise the upgrade will hang. - if typ != jobspb.TypeMigration && typ != jobspb.TypeSchemaChange { - registry.TestingWrapResumerConstructor( - typ, func(r jobs.Resumer) jobs.Resumer { return &fakeResumer{} }) - - record := jobs.Record{ - Details: jobspb.JobDetailsForEveryJobType[typ], - // We must pass a progress struct to be able to create a job. Since we - // override the resumer for each type to be a fake resumer, the type of - // progess we pass in does not matter. - Progress: jobspb.ImportProgress{}, - Username: username.TestUserName(), - } - - _, err := registry.CreateJobWithTxn(ctx, record, registry.MakeJobID(), nil /* txn */) - require.NoError(t, err) - } - }, false) - - // Run the upgrade which adds the job_type column. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1AddTypeColumnToJobsTable, - nil, /* done */ - false, /* expectError */ - ) - - // Check that the type column exists but has not been populated yet. - var count int - row := sqlDB.QueryRow("SELECT count(*) FROM system.jobs WHERE job_type IS NOT NULL") - err := row.Scan(&count) - require.NoError(t, err) - assert.Equal(t, 0, count) - - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.JobsTableID, - systemschema.JobsTable, - []string{}, - validationSchemas, - true, /* expectExists */ - ) - - // Run the upgrade which backfills the job_type column. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1BackfillTypeColumnInJobsTable, - nil, /* done */ - false, /* expectError */ - ) - - // Assert that we backfill the job_type column correctly for each type of job. - row = sqlDB.QueryRow("SELECT count(*) FROM system.jobs WHERE job_type IS NULL") - err = row.Scan(&count) - require.NoError(t, err) - assert.Equal(t, 0, count) - - var typStr string - rows, err := sqlDB.Query("SELECT distinct(job_type) FROM system.jobs") - require.NoError(t, err) - var seenTypes intsets.Fast - for rows.Next() { - err = rows.Scan(&typStr) - require.NoError(t, err) - seenTypes.Add(int(jobspb.Type_value[strings.ReplaceAll(typStr, " ", "_")])) - } - jobspb.ForEachType(func(typ jobspb.Type) { - assert.True(t, seenTypes.Contains(int(typ))) - }, false) -} diff --git a/pkg/upgrade/upgrades/alter_sql_instances_binary_version_test.go b/pkg/upgrade/upgrades/alter_sql_instances_binary_version_test.go deleted file mode 100644 index dc8fed3d0f21..000000000000 --- a/pkg/upgrade/upgrades/alter_sql_instances_binary_version_test.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" -) - -func TestAlterSystemSQLInstancesTableAddBinaryVersion(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V22_2), - }, - }, - }, - } - - var ( - ctx = context.Background() - - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var ( - validationSchemas = []upgrades.Schema{ - {Name: "binary_version", ValidationFn: upgrades.HasColumn}, - } - ) - - // Validate that the table sql_instances has the old schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.SQLInstancesTableID, - systemschema.SQLInstancesTable(), - []string{}, - validationSchemas, - false, /* expectExists */ - ) - // Run the upgrade. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1_SystemRbrReadNew, - nil, /* done */ - false, /* expectError */ - ) - // Validate that the table has new schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.SQLInstancesTableID, - systemschema.SQLInstancesTable(), - []string{}, - validationSchemas, - true, /* expectExists */ - ) -} diff --git a/pkg/upgrade/upgrades/alter_sql_instances_sql_addr_test.go b/pkg/upgrade/upgrades/alter_sql_instances_sql_addr_test.go deleted file mode 100644 index 7f3981b5c81e..000000000000 --- a/pkg/upgrade/upgrades/alter_sql_instances_sql_addr_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" -) - -func TestAlterSystemSqlInstancesTableAddSqlAddr(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1AlterSystemSQLInstancesAddSQLAddr - 1), - }, - }, - }, - } - - var ( - ctx = context.Background() - - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var ( - validationSchemas = []upgrades.Schema{ - {Name: "sql_addr", ValidationFn: upgrades.HasColumn}, - } - ) - - sqlInstancesTable := systemschema.SQLInstancesTable() - // Validate that the table sql_instances has the old schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.SQLInstancesTableID, - systemschema.SQLInstancesTable(), - []string{}, - validationSchemas, - false, /* expectExists */ - ) - // Run the upgrade. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1AlterSystemSQLInstancesAddSQLAddr, - nil, /* done */ - false, /* expectError */ - ) - // Validate that the table has new schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.SQLInstancesTableID, - sqlInstancesTable, - []string{}, - validationSchemas, - true, /* expectExists */ - ) -} diff --git a/pkg/upgrade/upgrades/alter_table_statistics_partial_predicate_and_id_test.go b/pkg/upgrade/upgrades/alter_table_statistics_partial_predicate_and_id_test.go deleted file mode 100644 index 64c80b3e3139..000000000000 --- a/pkg/upgrade/upgrades/alter_table_statistics_partial_predicate_and_id_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" -) - -func TestAlterSystemTableStatisticsAddPartialPredicateAndID(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1AddPartialStatisticsColumns - 1), - }, - }, - }, - } - - var ( - ctx = context.Background() - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var ( - validationSchemas = []upgrades.Schema{ - {Name: "partialPredicate", ValidationFn: upgrades.HasColumn}, - {Name: "fullStatisticID", ValidationFn: upgrades.HasColumn}, - } - ) - - // Validate that the table statistics table has the old schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.TableStatisticsTableID, - systemschema.TableStatisticsTable, - []string{}, - validationSchemas, - false, /* expectExists */ - ) - - // Run the upgrade. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1AddPartialStatisticsColumns, - nil, /* done */ - false, /* expectError */ - ) - - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.TableStatisticsTableID, - systemschema.TableStatisticsTable, - []string{}, - validationSchemas, - true, /* expectExists */ - ) -} diff --git a/pkg/upgrade/upgrades/backfill_job_info_table_migration_test.go b/pkg/upgrade/upgrades/backfill_job_info_table_migration_test.go deleted file mode 100644 index 640d550384e1..000000000000 --- a/pkg/upgrade/upgrades/backfill_job_info_table_migration_test.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - _ "github.com/cockroachdb/cockroach/pkg/ccl/backupccl" - _ "github.com/cockroachdb/cockroach/pkg/ccl/changefeedccl" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/jobs" - "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" - "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/spanconfig" - "github.com/cockroachdb/cockroach/pkg/sql" - "github.com/cockroachdb/cockroach/pkg/sql/isql" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/require" -) - -// TestBackfillJobsInfoTable tests that the `system.job_info` table is -// backfilled with the progress and payload of each job in the `system.jobs` -// table. -func TestBackfillJobsInfoTable(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - // Disable all automatic jobs creation and adoption. - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V22_2), - }, - SpanConfig: &spanconfig.TestingKnobs{ - ManagerDisableJobCreation: true, - }, - }, - }, - } - - ctx := context.Background() - tc := testcluster.StartTestCluster(t, 1, clusterArgs) - r := tc.Server(0).JobRegistry().(*jobs.Registry) - sqlDB := sqlutils.MakeSQLRunner(tc.ServerConn(0)) - defer tc.Stopper().Stop(ctx) - - createJob := func(id jobspb.JobID, details jobspb.Details, progress jobspb.ProgressDetails) { - defaultRecord := jobs.Record{ - Details: details, - Progress: progress, - Username: username.TestUserName(), - } - - var job *jobs.StartableJob - db := tc.Server(0).InternalDB().(*sql.InternalDB) - err := db.Txn(ctx, func(ctx context.Context, txn isql.Txn) error { - return r.CreateStartableJobWithTxn(ctx, &job, id, txn, defaultRecord) - }) - require.NoError(t, err) - } - - // Create a few different types of jobs. - createJob(1, jobspb.BackupDetails{}, jobspb.BackupProgress{}) - createJob(2, jobspb.RestoreDetails{}, jobspb.RestoreProgress{}) - createJob(3, jobspb.ChangefeedDetails{}, jobspb.ChangefeedProgress{}) - - upgrades.Upgrade(t, tc.ServerConn(0), clusterversion.V23_1CreateSystemJobInfoTable, nil, false) - - // Create two more jobs that we should see written to both system.jobs and - // system.job_info. - createJob(4, jobspb.ImportDetails{}, jobspb.ImportProgress{}) - createJob(5, jobspb.SchemaChangeDetails{}, jobspb.SchemaChangeProgress{}) - - // Validate that we see 2 rows (payload and progress) in the system.job_info - // table for each row written in the system.jobs table since the last upgrade. - sqlDB.CheckQueryResults(t, ` -SELECT count(*) FROM system.jobs AS j, system.job_info AS i -WHERE j.id = i.job_id AND (j.payload = i.value OR j.progress = i.value) AND (j.id >= 1 AND j.id <= 5) -`, - [][]string{{"4"}}) - - upgrades.Upgrade(t, tc.ServerConn(0), clusterversion.V23_1JobInfoTableIsBackfilled, nil, false) - - // At this point the entire system.jobs table should be backfilled into the - // system.job_info table. - // We expect to see 14 rows because of: - // - 4 rows from before - // - 10 rows (payload + progress) for the 5 jobs in system.jobs - sqlDB.CheckQueryResults(t, ` -SELECT count(*) FROM system.jobs AS j, system.job_info AS i -WHERE j.id = i.job_id AND (j.payload = i.value OR j.progress = i.value) AND (j.id >= 1 AND j.id <= 5) -`, - [][]string{{"14"}}) -} diff --git a/pkg/upgrade/upgrades/builtins_test.go b/pkg/upgrade/upgrades/builtins_test.go index a8ed69b3b65c..d114ced7a03d 100644 --- a/pkg/upgrade/upgrades/builtins_test.go +++ b/pkg/upgrade/upgrades/builtins_test.go @@ -32,7 +32,7 @@ func TestIsAtLeastVersionBuiltin(t *testing.T) { Knobs: base.TestingKnobs{ Server: &server.TestingKnobs{ DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V22_2), + BinaryVersionOverride: clusterversion.ByKey(clusterversion.BinaryMinSupportedVersionKey), }, }, }, @@ -46,8 +46,8 @@ func TestIsAtLeastVersionBuiltin(t *testing.T) { ) defer tc.Stopper().Stop(ctx) - v := clusterversion.ByKey(clusterversion.V23_1Start).String() - // Check that the builtin returns false when comparing against the new version + v := clusterversion.ByKey(clusterversion.VCurrent_Start).String() + // Check that the builtin returns false when comparing against the new // version because we are still on the bootstrap version. sqlDB.CheckQueryResults(t, "SELECT crdb_internal.is_at_least_version('"+v+"')", [][]string{{"false"}}) diff --git a/pkg/upgrade/upgrades/create_auto_config_runner_job_test.go b/pkg/upgrade/upgrades/create_auto_config_runner_job_test.go deleted file mode 100644 index 0a5d28876ca1..000000000000 --- a/pkg/upgrade/upgrades/create_auto_config_runner_job_test.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestCreateAutoConfigRunnerJob(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.Permanent_V23_1_CreateAutoConfigRunnerJob - 1), - }, - }, - }, - } - - var ( - ctx = context.Background() - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var count int - row := sqlDB.QueryRow("SELECT count(*) FROM crdb_internal.jobs WHERE job_type = 'AUTO CONFIG RUNNER'") - err := row.Scan(&count) - require.NoError(t, err) - assert.Equal(t, count, 0) - - upgrades.Upgrade( - t, - sqlDB, - clusterversion.Permanent_V23_1_CreateAutoConfigRunnerJob, - nil, /* done */ - false, /* expectError */ - ) - - row = sqlDB.QueryRow("SELECT count(*) FROM crdb_internal.jobs WHERE job_type = 'AUTO CONFIG RUNNER'") - err = row.Scan(&count) - require.NoError(t, err) - assert.Equal(t, count, 1) -} diff --git a/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics_test.go b/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics_test.go deleted file mode 100644 index e2fb8cce7028..000000000000 --- a/pkg/upgrade/upgrades/create_computed_indexes_sql_statistics_test.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" -) - -func TestCreateComputedIndexesOnSystemSQLStatistics(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1AddSQLStatsComputedIndexes - 1), - }, - }, - }, - } - - var ( - ctx = context.Background() - - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var ( - validationSchemas = []upgrades.Schema{ - {Name: "execution_count", ValidationFn: upgrades.HasColumn}, - {Name: "execution_count_idx", ValidationFn: upgrades.HasIndex}, - {Name: "service_latency", ValidationFn: upgrades.HasColumn}, - {Name: "service_latency_idx", ValidationFn: upgrades.HasIndex}, - {Name: "cpu_sql_nanos", ValidationFn: upgrades.HasColumn}, - {Name: "cpu_sql_nanos_idx", ValidationFn: upgrades.HasIndex}, - {Name: "contention_time", ValidationFn: upgrades.HasColumn}, - {Name: "contention_time_idx", ValidationFn: upgrades.HasIndex}, - {Name: "total_estimated_execution_time", ValidationFn: upgrades.HasColumn}, - {Name: "total_estimated_execution_time_idx", ValidationFn: upgrades.HasIndex}, - {Name: "p99_latency", ValidationFn: upgrades.HasColumn}, - {Name: "p99_latency_idx", ValidationFn: upgrades.HasIndex}, - {Name: "primary", ValidationFn: upgrades.OnlyHasColumnFamily}, - } - ) - - // Run the upgrade. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1AddSQLStatsComputedIndexes, - nil, /* done */ - false, /* expectError */ - ) - // Validate that the tables have new schemas. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.StatementStatisticsTableID, - systemschema.StatementStatisticsTable, - []string{}, - validationSchemas, - true, /* expectExists */ - ) - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.TransactionStatisticsTableID, - systemschema.TransactionStatisticsTable, - []string{}, - validationSchemas, - true, /* expectExists */ - ) -} diff --git a/pkg/upgrade/upgrades/create_index_usage_statement_statistics_test.go b/pkg/upgrade/upgrades/create_index_usage_statement_statistics_test.go deleted file mode 100644 index 6313310870e4..000000000000 --- a/pkg/upgrade/upgrades/create_index_usage_statement_statistics_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" -) - -func TestCreateIndexOnIndexUsageOnSystemStatementStatistics(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1_AlterSystemStatementStatisticsAddIndexesUsage - 1), - }, - }, - }, - } - - var ( - ctx = context.Background() - - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var ( - validationSchemas = []upgrades.Schema{ - {Name: "indexes_usage", ValidationFn: upgrades.HasColumn}, - {Name: "indexes_usage_idx", ValidationFn: upgrades.HasIndex}, - } - ) - - // Validate that the table statement_statistics has the old schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.StatementStatisticsTableID, - systemschema.StatementStatisticsTable, - []string{}, - validationSchemas, - false, /* expectExists */ - ) - // Run the upgrade. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1_AlterSystemStatementStatisticsAddIndexesUsage, - nil, /* done */ - false, /* expectError */ - ) - // Validate that the table has new schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.StatementStatisticsTableID, - systemschema.StatementStatisticsTable, - []string{}, - validationSchemas, - true, /* expectExists */ - ) -} diff --git a/pkg/upgrade/upgrades/create_jobs_metrics_polling_job_test.go b/pkg/upgrade/upgrades/create_jobs_metrics_polling_job_test.go index 2b2f96dbc9fd..5e4954f59e98 100644 --- a/pkg/upgrade/upgrades/create_jobs_metrics_polling_job_test.go +++ b/pkg/upgrade/upgrades/create_jobs_metrics_polling_job_test.go @@ -15,55 +15,31 @@ import ( "testing" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/cockroachdb/cockroach/pkg/util/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) +// TestCreateJobsMetricsPollingJob is testing the permanent upgrade associated +// with Permanent_V23_1_CreateJobsMetricsPollingJob. We no longer support +// versions this old, but we still need to test that the upgrade happens as +// expected when creating a new cluster. func TestCreateJobsMetricsPollingJob(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.Permanent_V23_1_CreateJobsMetricsPollingJob - 1), - }, - }, - }, - } - var ( ctx = context.Background() - tc = testcluster.StartTestCluster(t, 1, clusterArgs) + tc = testcluster.StartTestCluster(t, 1, base.TestClusterArgs{}) sqlDB = tc.ServerConn(0) ) defer tc.Stopper().Stop(ctx) + row := sqlDB.QueryRow("SELECT count(*) FROM crdb_internal.jobs WHERE job_type = 'POLL JOBS STATS'") var count int - row := sqlDB.QueryRow("SELECT count(*) FROM crdb_internal.jobs WHERE job_type = 'POLL STATS JOB'") err := row.Scan(&count) require.NoError(t, err) - assert.Equal(t, count, 0) - - upgrades.Upgrade( - t, - sqlDB, - clusterversion.Permanent_V23_1_CreateJobsMetricsPollingJob, - nil, /* done */ - false, /* expectError */ - ) - - row = sqlDB.QueryRow("SELECT count(*) FROM crdb_internal.jobs WHERE job_type = 'POLL JOBS STATS'") - err = row.Scan(&count) - require.NoError(t, err) assert.Equal(t, count, 1) } diff --git a/pkg/upgrade/upgrades/create_task_system_tables_test.go b/pkg/upgrade/upgrades/create_task_system_tables_test.go deleted file mode 100644 index b1c6db9bbae1..000000000000 --- a/pkg/upgrade/upgrades/create_task_system_tables_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/assert" -) - -func TestTaskTablesMigration(t *testing.T) { - skip.UnderStressRace(t) - defer leaktest.AfterTest(t)() - ctx := context.Background() - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1_TaskSystemTables - 1), - }, - }, - }, - } - - tc := testcluster.StartTestCluster(t, 1, clusterArgs) - - defer tc.Stopper().Stop(ctx) - db := tc.ServerConn(0) - defer db.Close() - - upgrades.Upgrade( - t, - db, - clusterversion.V23_1_TaskSystemTables, - nil, - false, - ) - - _, err := db.Exec("SELECT * FROM system.task_payloads") - assert.NoError(t, err, "system.task_payloads exists") - - _, err = db.Exec("SELECT * FROM system.tenant_tasks") - assert.NoError(t, err, "system.tenant_tasks exists") -} diff --git a/pkg/upgrade/upgrades/database_role_settings_table_user_id_migration_test.go b/pkg/upgrade/upgrades/database_role_settings_table_user_id_migration_test.go deleted file mode 100644 index 0433426864f8..000000000000 --- a/pkg/upgrade/upgrades/database_role_settings_table_user_id_migration_test.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - gosql "database/sql" - "fmt" - "strconv" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestDatabaseRoleSettingsUserIDMigrationNoUsers(t *testing.T) { - runTestDatabaseRoleSettingsUserIDMigration(t, 0) -} - -func TestDatabaseRoleSettingsUserIDMigration10Users(t *testing.T) { - runTestDatabaseRoleSettingsUserIDMigration(t, 10) -} - -func TestDatabaseRoleSettingsUserIDMigration1500Users(t *testing.T) { - skip.UnderRace(t) - skip.UnderStress(t) - runTestDatabaseRoleSettingsUserIDMigration(t, 1500) -} - -func runTestDatabaseRoleSettingsUserIDMigration(t *testing.T, numUsers int) { - defer leaktest.AfterTest(t)() - ctx := context.Background() - - tc := testcluster.StartTestCluster(t, 1 /* nodes */, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1DatabaseRoleSettingsHasRoleIDColumn - 1), - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - tdb := sqlutils.MakeSQLRunner(db) - - // Create test users and add rows for each user to system.database_role_settings. - upgrades.ExecForCountInTxns(ctx, t, db, numUsers, 100 /* txCount */, func(tx *gosql.Tx, i int) error { - if _, err := tx.Exec(fmt.Sprintf("CREATE USER testuser%d", i)); err != nil { - return err - } - if _, err := tx.Exec(fmt.Sprintf(`ALTER USER testuser%d SET application_name = 'roach sql'`, i)); err != nil { - return err - } - return nil - }) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.database_role_settings", [][]string{{strconv.Itoa(numUsers)}}) - - // Create a row in system.database_role_settings for the empty role. - tdb.Exec(t, "ALTER ROLE ALL SET timezone = 'America/New_York'") - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.database_role_settings", [][]string{{strconv.Itoa(numUsers + 1)}}) - - // Run migrations. - _, err := tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1DatabaseRoleSettingsHasRoleIDColumn).String()) - require.NoError(t, err) - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1DatabaseRoleSettingsRoleIDColumnBackfilled).String()) - require.NoError(t, err) - - // Verify that the final schema matches the expected one. - expectedSchema := `CREATE TABLE public.database_role_settings ( - database_id OID NOT NULL, - role_name STRING NOT NULL, - settings STRING[] NOT NULL, - role_id OID NOT NULL, - CONSTRAINT "primary" PRIMARY KEY (database_id ASC, role_name ASC), - UNIQUE INDEX database_role_settings_database_id_role_id_key (database_id ASC, role_id ASC) STORING (settings) -)` - r := tdb.QueryRow(t, "SELECT create_statement FROM [SHOW CREATE TABLE system.database_role_settings]") - var actualSchema string - r.Scan(&actualSchema) - require.Equal(t, expectedSchema, actualSchema) - - // Check that the backfill was successful and correct. - tdb.CheckQueryResults(t, "SELECT * FROM system.database_role_settings WHERE role_id IS NULL", [][]string{}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.database_role_settings", [][]string{{strconv.Itoa(numUsers + 1)}}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.database_role_settings AS a JOIN system.users AS b ON a.role_name = b.username AND a.role_id <> b.user_id", [][]string{{"0"}}) - tdb.CheckQueryResults(t, - fmt.Sprintf("SELECT count(*) FROM system.privileges WHERE username = '%s' AND user_id <> %d", - username.EmptyRole, username.EmptyRoleID), - [][]string{{"0"}}) -} diff --git a/pkg/upgrade/upgrades/delete_descriptors_of_dropped_functions_test.go b/pkg/upgrade/upgrades/delete_descriptors_of_dropped_functions_test.go deleted file mode 100644 index a7bd7a2674ee..000000000000 --- a/pkg/upgrade/upgrades/delete_descriptors_of_dropped_functions_test.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - gosql "database/sql" - "encoding/hex" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/settings/cluster" - "github.com/cockroachdb/cockroach/pkg/sql/catalog" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/descbuilder" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/descpb" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/funcdesc" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/util/hlc" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/require" -) - -const countToDeleteFunctionQuery = ` -WITH to_json AS ( - SELECT - id, - crdb_internal.pb_to_json( - 'cockroach.sql.sqlbase.Descriptor', - descriptor, - false - ) AS d - FROM - system.descriptor -), -to_delete AS ( - SELECT id - FROM to_json - WHERE - d->'function' IS NOT NULL - AND d->'function'->>'declarativeSchemaChangerState' IS NULL - AND d->'function'->>'state' = 'DROP' -) -SELECT count(id) -FROM to_delete -` - -// Similar to countToDeleteFunctionQuery but includes functions dropped by -// declarative schema changer. -const countTotalDroppedFunctionQuery = ` -WITH to_json AS ( - SELECT - id, - crdb_internal.pb_to_json( - 'cockroach.sql.sqlbase.Descriptor', - descriptor, - false - ) AS d - FROM - system.descriptor -), -to_delete AS ( - SELECT id - FROM to_json - WHERE - d->'function' IS NOT NULL - AND d->'function'->>'state' = 'DROP' -) -SELECT count(id) -FROM to_delete -` - -// Similar to countToDeleteFunctionQuery but includes functions dropped by -// declarative schema changer. -const countTotalFunctionQuery = ` -WITH to_json AS ( - SELECT - id, - crdb_internal.pb_to_json( - 'cockroach.sql.sqlbase.Descriptor', - descriptor, - false - ) AS d - FROM - system.descriptor -), -to_delete AS ( - SELECT id - FROM to_json - WHERE - d->'function' IS NOT NULL -) -SELECT count(id) -FROM to_delete -` - -func TestDeleteDescriptorsOfDroppedFunctions(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - var ( - v0 = clusterversion.ByKey(clusterversion.V23_1_DeleteDroppedFunctionDescriptors - 1) - v1 = clusterversion.ByKey(clusterversion.V23_1_DeleteDroppedFunctionDescriptors) - ) - - droppedFunctionsHex := []string{ - "2a5d0a016610731864206532100a0c08011040180030005014600010003801420953454c45435420313b48015000580162210a0b0a0561646d696e100218020a0a0a04726f6f74100218021204726f6f7418028001028a01009001029a0100", - "2a5d0a016710741864206532100a0c08011040180030005014600010003801420953454c45435420313b48015000580162210a0b0a0561646d696e100218020a0a0a04726f6f74100218021204726f6f7418028001028a01009001029a0100", - "2a5d0a016610751864206532100a0c08011040180030005014600010003801420953454c45435420313b48015000580162210a0b0a0561646d696e100218020a0a0a04726f6f74100218021204726f6f7418028001028a01009001029a0100", - "2a5d0a016710761864206532100a0c08011040180030005014600010003801420953454c45435420313b48015000580162210a0b0a0561646d696e100218020a0a0a04726f6f74100218021204726f6f7418028001028a01009001029a0100", - } - - droppedFunctionsHexDeclarative := "2ae5030a04666e6577106c1864206532100a0c08011040180030005014600010003801420953454c45435420313b48015000580162210a0b0a0561646d696e100218020a0a0a04726f6f74100218021204726f6f7418028001028a01009001029a0100a20181030a150a0bea0308086c1204726f6f7412040801100118010a1a0a10f2030d086c120561646d696e1802200212040801100118010a190a0ff2030c086c1204726f6f741802200212040801100118010a1e0a144a12086c220e0a0c08011040180030005014600012040801100118010a110a07a20604086c106512040801100118010a150a0b820a08086c1204666e657712040801100118010a130a098a0a06086c1202080112040801100118010a0f0a05920a02086c12040801100118010a130a099a0a06086c5a02080112040801100118010a1e0a14a20a11086c120953454c45435420313b1a020801120408011001180112510a4f0a1244524f502046554e4354494f4e20666e6577122a44524f502046554e4354494f4e20e280b92222e280ba2ee280b92222e280ba2ee280b9666e6577e280ba1a0d44524f502046554e4354494f4e1a170a04726f6f74120f2420636f636b726f6163682073716c220a01010105010101010101288180de85ed86c7cd0b320a00010203040506070809" - - publicFunctionHex := "2a640a08667075626c696335106d1864206532100a0c08011040180030005014600010003801420953454c45435420313b48015000580162210a0b0a0561646d696e100218020a0a0a04726f6f74100218021204726f6f7418028001008a01009001019a0100" - - ctx := context.Background() - settings := cluster.MakeTestingClusterSettingsWithVersions(v1, v0, false /* initializeVersion */) - require.NoError(t, clusterversion.Initialize(ctx, v0, &settings.SV)) - - tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Settings: settings, - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: v0, - }, - }, - }, - }) - - defer tc.Stopper().Stop(ctx) - - sqlDB := tc.ServerConn(0) - tdb := sqlutils.MakeSQLRunner(sqlDB) - - var parentID, parentSchemaID descpb.ID - tdb.Exec(t, "CREATE TABLE temp_tbl()") - tdb.QueryRow(t, `SELECT "parentID", "parentSchemaID" FROM system.namespace WHERE name = 'temp_tbl'`). - Scan(&parentID, &parentSchemaID) - - for _, fnHex := range droppedFunctionsHex { - decodeFunctionDescriptorAndInsert(t, ctx, sqlDB, fnHex, parentID, parentSchemaID, true /* dropped */) - } - decodeFunctionDescriptorAndInsert(t, ctx, sqlDB, droppedFunctionsHexDeclarative, parentID, parentSchemaID, true /* dropped */) - decodeFunctionDescriptorAndInsert(t, ctx, sqlDB, publicFunctionHex, parentID, parentSchemaID, false /* dropped */) - - // Make sure that the number of function descriptors to delete is right. - row := tdb.QueryRow(t, countToDeleteFunctionQuery) - var cntFnToDelete int - row.Scan(&cntFnToDelete) - require.Equal(t, 4, cntFnToDelete) - - row = tdb.QueryRow(t, countTotalDroppedFunctionQuery) - row.Scan(&cntFnToDelete) - require.Equal(t, 5, cntFnToDelete) - - row = tdb.QueryRow(t, countTotalFunctionQuery) - row.Scan(&cntFnToDelete) - require.Equal(t, 6, cntFnToDelete) - - var originalTotalDescCnt int - row = tdb.QueryRow(t, `SELECT count(*) FROM system.descriptor`) - row.Scan(&originalTotalDescCnt) - - // Upgrade to the new cluster version. - tdb.Exec(t, `SET CLUSTER SETTING version = $1`, v1.String()) - tdb.CheckQueryResultsRetry(t, "SHOW CLUSTER SETTING version", - [][]string{{v1.String()}}) - - // Make sure there is nothing to delete. - row = tdb.QueryRow(t, countToDeleteFunctionQuery) - row.Scan(&cntFnToDelete) - require.Equal(t, 0, cntFnToDelete) - - // Make sure other descriptors are intact. - const deletedFnCount = 4 - var newTotalDescCnt int - row = tdb.QueryRow(t, `SELECT count(*) FROM system.descriptor`) - row.Scan(&newTotalDescCnt) - require.Equal(t, originalTotalDescCnt-deletedFnCount, newTotalDescCnt) - - row = tdb.QueryRow(t, countTotalDroppedFunctionQuery) - row.Scan(&cntFnToDelete) - require.Equal(t, 1, cntFnToDelete) - - row = tdb.QueryRow(t, countTotalFunctionQuery) - row.Scan(&cntFnToDelete) - require.Equal(t, 2, cntFnToDelete) -} - -func decodeFunctionDescriptorAndInsert( - t *testing.T, - ctx context.Context, - sqlDB *gosql.DB, - hexEncodedDescriptor string, - parentID, parentSchemaID descpb.ID, - dropped bool, -) { - decodedDescriptor, err := hex.DecodeString(hexEncodedDescriptor) - require.NoError(t, err) - b, err := descbuilder.FromBytesAndMVCCTimestamp(decodedDescriptor, hlc.Timestamp{WallTime: 1}) - require.NoError(t, err) - require.NotNil(t, b) - require.Equal(t, catalog.Function, b.DescriptorType()) - // Run post deserialization changes. - require.NoError(t, b.RunPostDeserializationChanges()) - // Modify this descriptor's parentID and parentSchemaID - fnDesc := b.(funcdesc.FunctionDescriptorBuilder).BuildCreatedMutableFunction() - fnDesc.ParentID = parentID - fnDesc.ParentSchemaID = parentSchemaID - require.Equal(t, dropped, fnDesc.Dropped()) - // Insert the descriptor into test cluster. - require.NoError(t, sqlutils.InjectDescriptors( - ctx, sqlDB, []*descpb.Descriptor{fnDesc.DescriptorProto()}, true, /* force */ - )) -} diff --git a/pkg/upgrade/upgrades/desc_id_sequence_for_system_tenant_test.go b/pkg/upgrade/upgrades/desc_id_sequence_for_system_tenant_test.go deleted file mode 100644 index ce7805de26b6..000000000000 --- a/pkg/upgrade/upgrades/desc_id_sequence_for_system_tenant_test.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "fmt" - "sync" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/require" -) - -func TestDescriptorIDSequenceForSystemTenant(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - notifyOfMigrationErrorHandling := make(chan struct{}) - notifyToProceedWithCheck := make(chan struct{}) - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - TenantTestingKnobs: &sql.TenantTestingKnobs{ - BeforeCheckingForDescriptorIDSequence: func(ctx context.Context) { - notifyOfMigrationErrorHandling <- struct{}{} - <-notifyToProceedWithCheck - }, - }, - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1DescIDSequenceForSystemTenant - 2), - }, - }, - }, - } - - var ( - ctx = context.Background() - - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - tdb = sqlutils.MakeSQLRunner(sqlDB) - ) - defer tc.Stopper().Stop(ctx) - require.True(t, s.ExecutorConfig().(sql.ExecutorConfig).Codec.ForSystemTenant()) - - getOld := func() int64 { - ret, err := s.DB().Get(ctx, keys.LegacyDescIDGenerator) - require.NoError(t, err) - return ret.ValueInt() - } - getNew := func() int64 { - ret, err := s.DB().Get(ctx, keys.SystemSQLCodec.SequenceKey(keys.DescIDSequenceID)) - require.NoError(t, err) - return ret.ValueInt() - } - - // Check that the counters are in the expected initial state. - initOld := getOld() - require.NotZero(t, initOld, "legacy counter should not be zero") - require.Zero(t, getNew(), "sequence should be zero before upgrade") - - // Check that the legacy counter really has been used until now. - var maxID int64 - tdb.QueryRow(t, `SELECT max(id) FROM system.descriptor`).Scan(&maxID) - require.Less(t, maxID, initOld, "legacy counter should have been used in all cases") - - // Check that the legacy counter continues to be used. - tdb.Exec(t, `CREATE TABLE t1 (x INT PRIMARY KEY)`) - preMigration := getOld() - require.Less(t, initOld, preMigration, "legacy counter should be bumped") - require.Zero(t, getNew(), "sequence should be zero before upgrade") - - // Upgrade the cluster to the version prior to the descriptor ID migration. - tdb.Exec(t, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1DescIDSequenceForSystemTenant-1).String()) - - // Descriptor ID creation should throw an error which triggers a retry. - var wg sync.WaitGroup - wg.Add(1) - go func() { - tdb.Exec(t, `CREATE TABLE t2 (x INT PRIMARY KEY)`) - wg.Done() - }() - <-notifyOfMigrationErrorHandling - // As of now there is a pending retry which is blocked. - - // Check that the counters remain unchanged. - require.Equal(t, preMigration, getOld(), "legacy counter should remain unchanged") - require.Zero(t, getNew(), "sequence should be zero before upgrade") - - // Upgrade the cluster to the version after the descriptor ID migration. - tdb.Exec(t, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1DescIDSequenceForSystemTenant).String()) - - // Check that the sequence now exists. - var q = fmt.Sprintf(`SELECT count(*) FROM system.descriptor WHERE id = %d`, keys.DescIDSequenceID) - tdb.CheckQueryResultsRetry(t, q, [][]string{{"1"}}) - - // Check that the counters both have the correct value. - postMigrationNew := getNew() - require.Equal(t, preMigration, getOld(), "legacy counter should remain unchanged") - require.Equal(t, preMigration, postMigrationNew, "sequence counter should be set to legacy counter value") - - // Resume the blocked t2 table creation and wait for it to complete. - notifyToProceedWithCheck <- struct{}{} - wg.Wait() - - // Check that the sequence counter was used. - postMigrationTableCreation := getNew() - require.Equal(t, preMigration, getOld(), "legacy counter should remain unchanged") - require.Less(t, postMigrationNew, postMigrationTableCreation, "sequence counter should be bumped") - - // Descriptor ID creation should succeed. - tdb.Exec(t, `CREATE TABLE t3 (x INT PRIMARY KEY)`) - - // Check that the sequence remains in use. - require.Equal(t, preMigration, getOld(), "legacy counter should remain unchanged") - require.Less(t, postMigrationTableCreation, getNew(), "sequence counter should be bumped") -} diff --git a/pkg/upgrade/upgrades/external_connections_table_user_id_migration_test.go b/pkg/upgrade/upgrades/external_connections_table_user_id_migration_test.go deleted file mode 100644 index 07f6fc976db0..000000000000 --- a/pkg/upgrade/upgrades/external_connections_table_user_id_migration_test.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - gosql "database/sql" - "fmt" - "strconv" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - _ "github.com/cockroachdb/cockroach/pkg/cloud/userfile" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestExternalConnectionsUserIDMigrationNoUsers(t *testing.T) { - runTestExternalConnectionsUserIDMigration(t, 0) -} - -func TestExternalConnectionsUserIDMigration10Users(t *testing.T) { - skip.UnderRace(t) - skip.UnderStress(t) - runTestExternalConnectionsUserIDMigration(t, 10) -} - -func runTestExternalConnectionsUserIDMigration(t *testing.T, numUsers int) { - defer leaktest.AfterTest(t)() - ctx := context.Background() - - tc := testcluster.StartTestCluster(t, 1 /* nodes */, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1ExternalConnectionsTableHasOwnerIDColumn - 1), - BootstrapVersionKeyOverride: clusterversion.V22_2, - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - tdb := sqlutils.MakeSQLRunner(db) - - // Create test users. - upgrades.ExecForCountInTxns(ctx, t, db, numUsers, 100 /* txCount */, func(tx *gosql.Tx, i int) error { - if _, err := tx.Exec(fmt.Sprintf("CREATE USER testuser%d", i)); err != nil { - return err - } - if _, err := tx.Exec(fmt.Sprintf("GRANT SYSTEM EXTERNALCONNECTION TO testuser%d", i)); err != nil { - return err - } - return nil - }) - upgrades.ExecForCountInTxns(ctx, t, db, numUsers, 100 /* txCount */, func(tx *gosql.Tx, i int) error { - if _, err := tx.Exec(fmt.Sprintf("SET ROLE TO testuser%d", i)); err != nil { - return err - } - externalConnName := fmt.Sprintf("connection%d", i) - if _, err := tx.Exec(fmt.Sprintf("CREATE EXTERNAL CONNECTION %[1]s AS 'userfile:///%[1]s'", externalConnName)); err != nil { - return err - } - return nil - }) - tdb.Exec(t, "SET ROLE TO root") - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.external_connections", [][]string{{strconv.Itoa(numUsers)}}) - - // Run migrations. - _, err := tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1ExternalConnectionsTableHasOwnerIDColumn).String()) - require.NoError(t, err) - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1ExternalConnectionsTableOwnerIDColumnBackfilled).String()) - require.NoError(t, err) - - // Verify that the final schema matches the expected one. - expectedSchema := `CREATE TABLE public.external_connections ( - connection_name STRING NOT NULL, - created TIMESTAMP NOT NULL DEFAULT now():::TIMESTAMP, - updated TIMESTAMP NOT NULL DEFAULT now():::TIMESTAMP, - connection_type STRING NOT NULL, - connection_details BYTES NOT NULL, - owner STRING NOT NULL, - owner_id OID NOT NULL, - CONSTRAINT "primary" PRIMARY KEY (connection_name ASC) -)` - r := tdb.QueryRow(t, "SELECT create_statement FROM [SHOW CREATE TABLE system.external_connections]") - var actualSchema string - r.Scan(&actualSchema) - require.Equal(t, expectedSchema, actualSchema) - - // Check that the backfill was successful and correct. - tdb.CheckQueryResults(t, "SELECT * FROM system.external_connections WHERE owner_id IS NULL", [][]string{}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.external_connections", [][]string{{strconv.Itoa(numUsers)}}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.external_connections JOIN system.users ON owner = username AND owner_id <> user_id", [][]string{{"0"}}) -} diff --git a/pkg/upgrade/upgrades/json_forward_indexes_test.go b/pkg/upgrade/upgrades/json_forward_indexes_test.go deleted file mode 100644 index a3ceddc965fe..000000000000 --- a/pkg/upgrade/upgrades/json_forward_indexes_test.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/settings/cluster" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestJSONForwardingIndexes(t *testing.T) { - var err error - skip.UnderStressRace(t) - defer leaktest.AfterTest(t)() - ctx := context.Background() - - settings := cluster.MakeTestingClusterSettingsWithVersions( - clusterversion.TestingBinaryVersion, - clusterversion.TestingBinaryMinSupportedVersion, - false, - ) - - tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Settings: settings, - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.TestingBinaryMinSupportedVersion, - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - - // Set the cluster version to 22.2 to test that with the legacy schema changer - // we cannot create forward indexes on JSON columns. - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V22_2).String()) - require.NoError(t, err) - - _, err = db.Exec(`CREATE DATABASE test`) - require.NoError(t, err) - - _, err = db.Exec(`CREATE TABLE test.hello ( - key INT PRIMARY KEY, - j JSONB -)`) - require.NoError(t, err) - - _, err = db.Exec(`INSERT INTO test.hello VALUES (1, '[{"a":"b"}]'::JSONB)`) - require.NoError(t, err) - - // Creating an index on the JSON column should result in an error. - _, err = db.Exec(`CREATE INDEX testidx_col on test.hello (j)`) - require.Error(t, err) - - // Creating an JSON expression index should result in an error. - _, err = db.Exec(`CREATE INDEX testidx_expr on test.hello ((j->'a'))`) - require.Error(t, err) - - // Creating a table with an index on the JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_secondary( - j JSONB, - INDEX tbl_json_secondary_idx (j) -)`) - require.Error(t, err) - - // Creating a table with an index on the JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_unique( - j JSONB, - UNIQUE tbl_json_secondary_uidx (j) -)`) - require.Error(t, err) - - // Creating a primary key on a JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_primary ( - key JSONB PRIMARY KEY - )`) - require.Error(t, err) - - // Set the cluster version to 23.1 to test that with the declarative schema - // changer we cannot create forward indexes on JSON columns. - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1).String()) - require.NoError(t, err) - - // Creating an index on the JSON column should result in an error. - _, err = db.Exec(`CREATE INDEX on test.hello (j)`) - require.Error(t, err) - - // Creating an JSON expression index should result in an error. - _, err = db.Exec(`CREATE INDEX on test.hello ((j->'a'))`) - require.Error(t, err) - - // Creating a table with an index on the JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_secondary( - j JSONB, - INDEX tbl_json_secondary_idx (j) -)`) - require.Error(t, err) - - // Creating a table with an index on the JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_secondary_unique( - j JSONB, - UNIQUE tbl_json_secondary_uidx (j) -)`) - require.Error(t, err) - - // Creating a primary key on a JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_primary ( - key JSONB PRIMARY KEY - )`) - require.Error(t, err) - - // Creating a table with an inverted index with a JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_secondary_unique( - s GEOGRAPHY, - j JSONB, - INVERTED INDEX tbl_json_secondary_uidx (j, s) -)`) - require.Error(t, err) - - // Setting a cluster version that supports forward indexes on JSON - // columns and expecting success when creating forward indexes. - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_2).String()) - require.NoError(t, err) - - // Creating an index on the JSON column should not result in an error. - _, err = db.Exec(`CREATE INDEX on test.hello (j)`) - require.NoError(t, err) - - // Creating an JSON expression index should not result in an error. - _, err = db.Exec(`CREATE INDEX on test.hello ((j->'a'))`) - require.NoError(t, err) - - // Creating a table with an index on the JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_secondary( - j JSONB, - INDEX tbl_json_secondary_idx (j) -)`) - require.NoError(t, err) - - // Creating a primary key on a JSON column should result in an error. - _, err = db.Exec(`CREATE TABLE test.tbl_json_primary ( - key JSONB PRIMARY KEY - )`) - require.NoError(t, err) - - // Creating a table with an inverted index with a JSON column should not result - // in an error once inverted indexes are supported. - _, err = db.Exec(`CREATE TABLE test.tbl_json_secondary_unique( - s GEOGRAPHY, - j JSONB, - INVERTED INDEX tbl_json_secondary_uidx (j, s) -)`) - require.NoError(t, err) -} diff --git a/pkg/upgrade/upgrades/key_visualizer_migration_test.go b/pkg/upgrade/upgrades/key_visualizer_migration_test.go deleted file mode 100644 index f604a487fa31..000000000000 --- a/pkg/upgrade/upgrades/key_visualizer_migration_test.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/assert" -) - -func TestKeyVisualizerTablesMigration(t *testing.T) { - skip.UnderStressRace(t) - defer leaktest.AfterTest(t)() - ctx := context.Background() - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.Permanent_V23_1KeyVisualizerTablesAndJobs - 1), - }, - }, - }, - } - - tc := testcluster.StartTestCluster(t, 1, clusterArgs) - - defer tc.Stopper().Stop(ctx) - db := tc.ServerConn(0) - defer db.Close() - - upgrades.Upgrade( - t, - db, - clusterversion.Permanent_V23_1KeyVisualizerTablesAndJobs, - nil, - false, - ) - - _, err := db.Exec("SELECT * FROM system.span_stats_unique_keys") - assert.NoError(t, err, "system.span_stats_unique_keys exists") - - _, err = db.Exec("SELECT * FROM system.span_stats_buckets") - assert.NoError(t, err, "system.span_stats_buckets exists") - - _, err = db.Exec("SELECT * FROM system.span_stats_samples") - assert.NoError(t, err, "system.span_stats_samples exists") - - _, err = db.Exec("SELECT * FROM system.span_stats_tenant_boundaries") - assert.NoError(t, err, "system.span_stats_tenant_boundaries exists") - -} diff --git a/pkg/upgrade/upgrades/role_members_ids_migration_test.go b/pkg/upgrade/upgrades/role_members_ids_migration_test.go deleted file mode 100644 index 5ff14b03b597..000000000000 --- a/pkg/upgrade/upgrades/role_members_ids_migration_test.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - gosql "database/sql" - "fmt" - "math/rand" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/sem/eval" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestRoleMembersIDMigrationNoUsers(t *testing.T) { - runTestRoleMembersIDMigration(t, 0) -} - -func TestRoleMembersIDMigration10Users(t *testing.T) { - runTestRoleMembersIDMigration(t, 10) -} - -func TestRoleMembersIDMigration1200Users(t *testing.T) { - skip.UnderRace(t) - skip.UnderStress(t) - // Choosing a number larger than 1000 tests that the batching logic in - // this upgrade works correctly. - runTestRoleMembersIDMigration(t, 1200) -} - -func runTestRoleMembersIDMigration(t *testing.T, numUsers int) { - defer leaktest.AfterTest(t)() - ctx := context.Background() - - tc := testcluster.StartTestCluster(t, 1 /* nodes */, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - SQLEvalContext: &eval.TestingKnobs{ - ForceProductionValues: true, - }, - Server: &server.TestingKnobs{ - BootstrapVersionKeyOverride: clusterversion.V22_2, - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1RoleMembersTableHasIDColumns - 1), - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - tdb := sqlutils.MakeSQLRunner(db) - - // Delete all rows from the system.role_members table. - tdb.Exec(t, "DELETE FROM system.role_members WHERE true") - tdb.CheckQueryResults(t, "SELECT * FROM system.role_members", [][]string{}) - - // Insert row that would have been added in a legacy startup migration. - tdb.Exec(t, `INSERT INTO system.role_members ("role", "member", "isAdmin") VALUES ('admin', 'root', true)`) - tdb.CheckQueryResults(t, `SELECT * FROM system.role_members`, [][]string{ - {"admin", "root", "true"}, - }) - - // Create test users. - upgrades.ExecForCountInTxns(ctx, t, db, numUsers, 100 /* txCount */, func(tx *gosql.Tx, i int) error { - if _, err := tx.Exec(fmt.Sprintf("CREATE USER testuser%d", i)); err != nil { - return err - } - if i == 0 { - if _, err := tx.Exec(fmt.Sprintf("GRANT admin TO testuser%d", i)); err != nil { - return err - } - return nil - } - // Randomly choose an earlier test user to grant to the current test user. - grantStmt := fmt.Sprintf("GRANT testuser%d TO testuser%d", rand.Intn(i), i) - if rand.Intn(2) == 1 { - grantStmt += " WITH ADMIN OPTION" - } - if _, err := tx.Exec(grantStmt); err != nil { - return err - } - return nil - }) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.role_members", [][]string{ - {fmt.Sprintf("%d", numUsers+1)}, - }) - - // Run migrations. - _, err := tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1RoleMembersTableHasIDColumns).String()) - require.NoError(t, err) - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1RoleMembersIDColumnsBackfilled).String()) - require.NoError(t, err) - - // Check some basic conditions on system.role_members after the migration is complete. - tdb.CheckQueryResults(t, "SELECT * FROM system.role_members WHERE role_id IS NULL OR member_id IS NULL", [][]string{}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.role_members AS a JOIN system.users AS b on a.role = b.username AND a.role_id <> b.user_id", [][]string{{"0"}}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.role_members AS a JOIN system.users AS b on a.member = b.username AND a.member_id <> b.user_id", [][]string{{"0"}}) - - tdb.CheckQueryResults(t, `SELECT * FROM system.role_members WHERE "role" = 'admin' AND "member" = 'root'`, [][]string{ - {"admin", "root", "true", "2", "1"}, - }) - - // Verify that the final schema matches the expected one. - expectedSchema := `CREATE TABLE public.role_members ( - "role" STRING NOT NULL, - member STRING NOT NULL, - "isAdmin" BOOL NOT NULL, - role_id OID NOT NULL, - member_id OID NOT NULL, - CONSTRAINT "primary" PRIMARY KEY ("role" ASC, member ASC), - INDEX role_members_role_idx ("role" ASC), - INDEX role_members_member_idx (member ASC), - INDEX role_members_role_id_idx (role_id ASC), - INDEX role_members_member_id_idx (member_id ASC), - UNIQUE INDEX role_members_role_id_member_id_key (role_id ASC, member_id ASC), - FAMILY "primary" ("role", member), - FAMILY "fam_3_isAdmin" ("isAdmin"), - FAMILY fam_4_role_id (role_id), - FAMILY fam_5_member_id (member_id) -)` - r := tc.Conns[0].QueryRow("SELECT create_statement FROM [SHOW CREATE TABLE system.role_members]") - var actualSchema string - require.NoError(t, r.Scan(&actualSchema)) - require.Equal(t, expectedSchema, actualSchema) -} diff --git a/pkg/upgrade/upgrades/schemachanger_elements_test.go b/pkg/upgrade/upgrades/schemachanger_elements_test.go deleted file mode 100644 index 14159e7e8841..000000000000 --- a/pkg/upgrade/upgrades/schemachanger_elements_test.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - gosql "database/sql" - "sync/atomic" - "testing" - "time" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/jobs" - "github.com/cockroachdb/cockroach/pkg/jobs/jobspb" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scexec" - "github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scop" - "github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scplan" - "github.com/cockroachdb/cockroach/pkg/testutils" - "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" - "github.com/cockroachdb/cockroach/pkg/util" - "github.com/cockroachdb/cockroach/pkg/util/ctxgroup" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/require" -) - -func TestUpgradeSchemaChangerElements(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - ctx := context.Background() - const ( - WaitForSchemaChangeCompletion = 1 - ForceJobFirst = 2 - NoWaitRequired = 0 - ) - testCases := []struct { - name string - after func(t *testing.T, sqlDB *gosql.DB) error - run func(t *testing.T, sqlDB *gosql.DB) error - unpauseJob bool - waitType int - }{ - { - name: "running schema change that will have a deprecated waitForSchemaChangerElementMigration element", - run: func(t *testing.T, sqlDB *gosql.DB) error { - _, err := sqlDB.Exec("SET sql_safe_updates=off") - require.NoError(t, err) - _, err = sqlDB.Exec("ALTER TABLE t DROP COLUMN b") - require.ErrorContains(t, err, "was paused before it completed with reason: pause point \"newschemachanger.before.exec\" hit") - return nil - }, - unpauseJob: true, - waitType: WaitForSchemaChangeCompletion, - }, - { - "running schema change that will have no deprecated elements", - nil, - func(t *testing.T, sqlDB *gosql.DB) error { - _, err := sqlDB.Exec("SET sql_safe_updates=off") - require.NoError(t, err) - _, err = sqlDB.Exec("ALTER TABLE t ADD COLUMN j int") - require.ErrorContains(t, err, "was paused before it completed with reason: pause point \"newschemachanger.before.exec\" hit") - return nil - }, - true, - ForceJobFirst | WaitForSchemaChangeCompletion, // ADD COLUMN will not have any deprecated elements, so no one will wait for the job. - }, - { - "running schema change that will have a deprecated waitForSchemaChangerElementMigration element but is paused", - func(t *testing.T, sqlDB *gosql.DB) error { - _, err := sqlDB.Exec("SET CLUSTER SETTING jobs.debug.pausepoints=''") - require.NoError(t, err) - _, err = sqlDB.Exec("RESUME JOB (SELECT job_id FROM crdb_internal.jobs WHERE description LIKE 'ALTER TABLE%' AND status='paused' FETCH FIRST 1 ROWS ONLY);") - require.NoError(t, err) - testutils.SucceedsSoon(t, func() error { - row := sqlDB.QueryRow("SELECT job_id FROM crdb_internal.jobs WHERE description LIKE 'ALTER TABLE%' AND status='succeeded' FETCH FIRST 1 ROWS ONLY;") - var id int64 - if err = row.Scan(&id); err != nil { - return err - } - return nil - }) - return nil - }, - func(t *testing.T, sqlDB *gosql.DB) error { - _, err := sqlDB.Exec("SET sql_safe_updates=off") - require.NoError(t, err) - _, err = sqlDB.Exec("ALTER TABLE t DROP COLUMN b") - require.ErrorContains(t, err, "was paused before it completed with reason: pause point \"newschemachanger.before.exec\" hit") - return nil - }, - false, - NoWaitRequired, - }, - } - - for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { - var params base.TestServerArgs - params.Knobs.Server = &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1_SchemaChangerDeprecatedIndexPredicates - 1), - } - - var ( - schemaChangeAllowedToComplete chan struct{} - waitedForJob chan struct{} - jobIsPaused chan struct{} - jobStarted chan struct{} - readyToQuery int64 = 0 - ) - scJobID := int64(jobspb.InvalidJobID) - params.Knobs.SQLDeclarativeSchemaChanger = &scexec.TestingKnobs{ - BeforeStage: func(p scplan.Plan, stageIdx int) error { - if waitedForJob == nil { - return nil - } - if p.Stages[stageIdx].Phase == scop.PreCommitPhase { - atomic.StoreInt64(&scJobID, int64(p.JobID)) - } else if p.Stages[stageIdx].Phase > scop.PreCommitPhase { - if tc.unpauseJob { - jobStarted <- struct{}{} - } - <-waitedForJob - waitedForJob = nil - schemaChangeAllowedToComplete <- struct{}{} - } - return nil - }, - } - jobKnobs := jobs.NewTestingKnobsWithShortIntervals() - jobKnobs.IntervalOverrides.WaitForJobsInitialDelay = shortInterval() - jobKnobs.IntervalOverrides.WaitForJobsMaxDelay = shortInterval() - jobKnobs.BeforeWaitForJobsQuery = func(jobs []jobspb.JobID) { - if targetJobID := jobspb.JobID(atomic.LoadInt64(&scJobID)); targetJobID != jobspb.InvalidJobID { - for _, j := range jobs { - // The upgrade is waiting for the job... - if j == targetJobID && atomic.CompareAndSwapInt64(&readyToQuery, 1, 0) { - atomic.StoreInt64(&scJobID, int64(jobspb.InvalidJobID)) - waitedForJob <- struct{}{} - } - } - - } - } - params.Knobs.JobsTestingKnobs = jobKnobs - s, sqlDB, _ := serverutils.StartServer(t, params) - defer s.Stopper().Stop(ctx) - // Make sure our cluster is up - _, err := sqlDB.Exec("SET CLUSTER SETTING version=$1", - clusterversion.ByKey(clusterversion.V23_1_SchemaChangerDeprecatedIndexPredicates-1).String()) - require.NoError(t, err) - _, err = sqlDB.Exec("CREATE TABLE t (pk INT PRIMARY KEY, b INT)") - require.NoError(t, err) - _, err = sqlDB.Exec("CREATE UNIQUE INDEX ON t (b) WHERE pk > 0") - require.NoError(t, err) - _, err = sqlDB.Exec("SET CLUSTER SETTING jobs.debug.pausepoints='newschemachanger.before.exec'") - require.NoError(t, err) - ctx := context.Background() - g := ctxgroup.WithContext(ctx) - - schemaChangeAllowedToComplete = make(chan struct{}) - waitedForJob = make(chan struct{}) - jobIsPaused = make(chan struct{}) - jobStarted = make(chan struct{}) - g.GoCtx(func(ctx context.Context) error { - err := tc.run(t, sqlDB) - jobIsPaused <- struct{}{} - return err - }) - - g.GoCtx(func(ctx context.Context) error { - <-jobIsPaused - atomic.StoreInt64(&readyToQuery, 1) - if tc.unpauseJob { - _, err = sqlDB.Exec("SET CLUSTER SETTING jobs.debug.pausepoints=''") - require.NoError(t, err) - _, err = sqlDB.Exec("RESUME JOB $1", jobspb.JobID(atomic.LoadInt64(&scJobID))) - require.NoError(t, err) - // Wait for the job to start after the unpause, - // we will let it get stuck during execution next. - // We don't want a race condition with the migration - // job that will pause it again. - <-jobStarted - } - _, err = sqlDB.Exec("SET CLUSTER SETTING version = $1", - clusterversion.ByKey(clusterversion.V23_1_SchemaChangerDeprecatedIndexPredicates).String()) - return err - }) - - if tc.waitType&ForceJobFirst > 0 { - // Pretend that we waited for the job, if - // we actually wait again a hang will occur. - waitedForJob <- struct{}{} - } - if tc.waitType&WaitForSchemaChangeCompletion > 0 { - <-schemaChangeAllowedToComplete - } - require.NoError(t, g.Wait()) - if tc.after != nil { - // Prevent any unintended waits on schema changes. - waitedForJob = nil - require.NoError(t, tc.after(t, sqlDB)) - } - }) - } -} - -func shortInterval() *time.Duration { - shortInterval := 10 * time.Millisecond - if util.RaceEnabled { - shortInterval *= 5 - } - return &shortInterval -} diff --git a/pkg/upgrade/upgrades/sql_stats_ttl_test.go b/pkg/upgrade/upgrades/sql_stats_ttl_test.go index e9f006a747aa..2a3571e58ab7 100644 --- a/pkg/upgrade/upgrades/sql_stats_ttl_test.go +++ b/pkg/upgrade/upgrades/sql_stats_ttl_test.go @@ -16,47 +16,27 @@ import ( "testing" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" "github.com/cockroachdb/cockroach/pkg/testutils/skip" "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) +// TestSQLStatsTTLChange is testing the permanent upgrade associated with +// Permanent_V23_1ChangeSQLStatsTTL. We no longer support versions this old, but +// we still need to test that the upgrade happens as expected when creating a +// new cluster. func TestSQLStatsTTLChange(t *testing.T) { skip.UnderStressRace(t) defer leaktest.AfterTest(t)() - ctx := context.Background() - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.Permanent_V23_1ChangeSQLStatsTTL - 1), - }, - }, - }, - } - - tc := testcluster.StartTestCluster(t, 1, clusterArgs) + ctx := context.Background() + tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{}) defer tc.Stopper().Stop(ctx) db := tc.ServerConn(0) defer db.Close() - upgrades.Upgrade( - t, - db, - clusterversion.Permanent_V23_1ChangeSQLStatsTTL, - nil, - false, - ) - tables := []string{ "system.public.statement_statistics", "system.public.transaction_statistics", diff --git a/pkg/upgrade/upgrades/system_activity_update_job_test.go b/pkg/upgrade/upgrades/system_activity_update_job_test.go index 9c59b8707b9b..9b0687a90c58 100644 --- a/pkg/upgrade/upgrades/system_activity_update_job_test.go +++ b/pkg/upgrade/upgrades/system_activity_update_job_test.go @@ -15,54 +15,27 @@ import ( "testing" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/settings/cluster" "github.com/cockroachdb/cockroach/pkg/testutils/skip" "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/stretchr/testify/assert" ) +// TestCreateActivityUpdateJobMigration is testing the permanent upgrade +// associated Permanent_V23_1CreateSystemActivityUpdateJob. We no longer support +// versions this old, but we still need to test that the upgrade happens as +// expected when creating a new cluster. func TestCreateActivityUpdateJobMigration(t *testing.T) { skip.UnderStressRace(t) defer leaktest.AfterTest(t)() ctx := context.Background() - settings := cluster.MakeTestingClusterSettingsWithVersions( - clusterversion.TestingBinaryVersion, - clusterversion.TestingBinaryMinSupportedVersion, - false, - ) - - tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Settings: settings, - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.TestingBinaryMinSupportedVersion, - }, - }, - }, - }) + tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{}) defer tc.Stopper().Stop(ctx) db := tc.ServerConn(0) defer db.Close() - // NB: this isn't actually doing anything, since the table is baked into the - // bootstrap schema, so this is really just showing the upgrade is idempotent, - // but this is in line with the other tests of createSystemTable upgrades. - upgrades.Upgrade( - t, - db, - clusterversion.Permanent_V23_1CreateSystemActivityUpdateJob, - nil, - false, - ) - row := db.QueryRow("SELECT count(*) FROM system.public.jobs WHERE id = 103") assert.NotNil(t, row) assert.NoError(t, row.Err()) diff --git a/pkg/upgrade/upgrades/system_job_info_test.go b/pkg/upgrade/upgrades/system_job_info_test.go deleted file mode 100644 index d4438db7dfc6..000000000000 --- a/pkg/upgrade/upgrades/system_job_info_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/desctestutils" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestSystemJobInfoMigration(t *testing.T) { - skip.UnderStressRace(t) - defer leaktest.AfterTest(t)() - ctx := context.Background() - - tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.BinaryMinSupportedVersionKey), - BootstrapVersionKeyOverride: clusterversion.BinaryMinSupportedVersionKey, - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - - // Advance to the version immediately before the one that - // interests us. - upgrades.Upgrade( - t, - db, - clusterversion.V23_1CreateSystemJobInfoTable-1, - nil, - false, - ) - - // We verify that the jobs table gets its version upgraded through - // the upgrade, to ensure the creation of job_info synchronizes with - // concurrent accesses to the jobs table. - kvDB := tc.Server(0).DB() - tblBefore := desctestutils.TestingGetTableDescriptor(kvDB, keys.SystemSQLCodec, "system", "public", "jobs") - - upgrades.Upgrade( - t, - db, - clusterversion.V23_1CreateSystemJobInfoTable, - nil, - false, - ) - - tblAfter := desctestutils.TestingGetTableDescriptor(kvDB, keys.SystemSQLCodec, "system", "public", "jobs") - require.Greater(t, tblAfter.GetVersion(), tblBefore.GetVersion()) -} diff --git a/pkg/upgrade/upgrades/system_privileges_index_migration_test.go b/pkg/upgrade/upgrades/system_privileges_index_migration_test.go deleted file mode 100644 index d169e068e690..000000000000 --- a/pkg/upgrade/upgrades/system_privileges_index_migration_test.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestSystemPrivilegesIndexMigration(t *testing.T) { - defer leaktest.AfterTest(t)() - ctx := context.Background() - - tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1AlterSystemPrivilegesAddIndexOnPathAndUsername - 1), - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - tdb := sqlutils.MakeSQLRunner(db) - - // Run migration. - _, err := tc.Conns[0].ExecContext( - ctx, - `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1AlterSystemPrivilegesAddIndexOnPathAndUsername).String(), - ) - require.NoError(t, err) - - expectedSchema := `CREATE TABLE public.privileges ( - username STRING NOT NULL, - path STRING NOT NULL, - privileges STRING[] NOT NULL, - grant_options STRING[] NOT NULL, - user_id OID NOT NULL, - CONSTRAINT "primary" PRIMARY KEY (username ASC, path ASC), - UNIQUE INDEX privileges_path_user_id_key (path ASC, user_id ASC) STORING (privileges, grant_options), - UNIQUE INDEX privileges_path_username_key (path ASC, username ASC) STORING (privileges, grant_options) -)` - r := tdb.QueryRow(t, "SELECT create_statement FROM [SHOW CREATE TABLE system.privileges]") - var actualSchema string - r.Scan(&actualSchema) - require.Equal(t, expectedSchema, actualSchema) -} diff --git a/pkg/upgrade/upgrades/system_privileges_user_id_migration_test.go b/pkg/upgrade/upgrades/system_privileges_user_id_migration_test.go deleted file mode 100644 index 5c99b2fa62e5..000000000000 --- a/pkg/upgrade/upgrades/system_privileges_user_id_migration_test.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - gosql "database/sql" - "fmt" - "strconv" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/sem/eval" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestSystemPrivilegesUserIDMigrationNoUsers(t *testing.T) { - runTestSystemPrivilegesUserIDMigration(t, 0) -} - -func TestSystemPrivilegesUserIDMigration10Users(t *testing.T) { - runTestSystemPrivilegesUserIDMigration(t, 10) -} - -func TestSystemPrivilegesUserIDMigration1500Users(t *testing.T) { - skip.UnderRace(t) - skip.UnderStress(t) - runTestSystemPrivilegesUserIDMigration(t, 1500) -} - -func runTestSystemPrivilegesUserIDMigration(t *testing.T, numUsers int) { - defer leaktest.AfterTest(t)() - ctx := context.Background() - - tc := testcluster.StartTestCluster(t, 1 /* nodes */, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - SQLEvalContext: &eval.TestingKnobs{ - ForceProductionValues: true, - }, - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1SystemPrivilegesTableHasUserIDColumn - 1), - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - tdb := sqlutils.MakeSQLRunner(db) - - // Create test users and add rows for each user to system.privileges. - upgrades.ExecForCountInTxns(ctx, t, db, numUsers, 100 /* txCount */, func(tx *gosql.Tx, i int) error { - if _, err := tx.Exec(fmt.Sprintf("CREATE USER testuser%d", i)); err != nil { - return err - } - if _, err := tx.Exec(fmt.Sprintf("GRANT SYSTEM MODIFYCLUSTERSETTING TO testuser%d", i)); err != nil { - return err - } - return nil - }) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.privileges", [][]string{{strconv.Itoa(numUsers)}}) - - // Create a row in system.privileges for the "public" role. - tdb.Exec(t, "REVOKE SELECT ON crdb_internal.tables FROM public") - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.privileges", [][]string{{strconv.Itoa(numUsers + 1)}}) - - // Run migrations. - _, err := tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1SystemPrivilegesTableHasUserIDColumn).String()) - require.NoError(t, err) - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1SystemPrivilegesTableUserIDColumnBackfilled).String()) - require.NoError(t, err) - - // Verify that the final schema matches the expected one. - expectedSchema := `CREATE TABLE public.privileges ( - username STRING NOT NULL, - path STRING NOT NULL, - privileges STRING[] NOT NULL, - grant_options STRING[] NOT NULL, - user_id OID NOT NULL, - CONSTRAINT "primary" PRIMARY KEY (username ASC, path ASC), - UNIQUE INDEX privileges_path_user_id_key (path ASC, user_id ASC) STORING (privileges, grant_options) -)` - r := tdb.QueryRow(t, "SELECT create_statement FROM [SHOW CREATE TABLE system.privileges]") - var actualSchema string - r.Scan(&actualSchema) - require.Equal(t, expectedSchema, actualSchema) - - // Check that the backfill was successful and correct. - tdb.CheckQueryResults(t, "SELECT * FROM system.privileges WHERE user_id IS NULL", [][]string{}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.privileges", [][]string{{strconv.Itoa(numUsers + 1)}}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.privileges AS a JOIN system.users AS b ON a.username = b.username AND a.user_id <> b.user_id", [][]string{{"0"}}) - tdb.CheckQueryResults(t, - fmt.Sprintf("SELECT count(*) FROM system.privileges WHERE username = '%s' AND user_id <> %d", - username.PublicRole, username.PublicRoleID), - [][]string{{"0"}}) -} diff --git a/pkg/upgrade/upgrades/system_statistics_activity_test.go b/pkg/upgrade/upgrades/system_statistics_activity_test.go deleted file mode 100644 index 238899b15b68..000000000000 --- a/pkg/upgrade/upgrades/system_statistics_activity_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/settings/cluster" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/assert" -) - -func TestSystemActivityMigration(t *testing.T) { - skip.UnderStressRace(t) - defer leaktest.AfterTest(t)() - ctx := context.Background() - - settings := cluster.MakeTestingClusterSettingsWithVersions( - clusterversion.TestingBinaryVersion, - clusterversion.TestingBinaryMinSupportedVersion, - false, - ) - - tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Settings: settings, - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.TestingBinaryMinSupportedVersion, - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - - // NB: this isn't actually doing anything, since the table is baked into the - // bootstrap schema, so this is really just showing the upgrade is idempotent, - // but this is in line with the other tests of createSystemTable upgrades. - upgrades.Upgrade( - t, - db, - clusterversion.V23_1AddSystemActivityTables, - nil, - false, - ) - - _, err := db.Exec("SELECT * FROM system.statement_activity") - assert.NoError(t, err, "system.statement_activity exists") - - _, err = db.Exec("SELECT * FROM system.transaction_activity") - assert.NoError(t, err, "system.transaction_activity exists") -} diff --git a/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant_test.go b/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant_test.go deleted file mode 100644 index cf00ffec19cd..000000000000 --- a/pkg/upgrade/upgrades/tenant_id_sequence_for_system_tenant_test.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/require" -) - -func TestTenantIDSequenceForSystemTenant(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: clusterversion.ByKey(clusterversion.BinaryMinSupportedVersionKey), - BootstrapVersionKeyOverride: clusterversion.BinaryMinSupportedVersionKey, - }, - }, - }, - } - - var ( - ctx = context.Background() - - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - require.True(t, s.ExecutorConfig().(sql.ExecutorConfig).Codec.ForSystemTenant()) - - // Advance to the version immediately before the one that - // interests us. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1_TenantIDSequence-1, - nil, - false, - ) - - // Check that the sequence does not exist. - var seqVal int - err := sqlDB.QueryRow(`SELECT last_value FROM system.public.tenant_id_seq`).Scan(&seqVal) - require.Error(t, err) - - // Introduce the sequence. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1_TenantIDSequence, - nil, - false, - ) - - err = sqlDB.QueryRow(`SELECT last_value FROM system.public.tenant_id_seq`).Scan(&seqVal) - require.NoError(t, err) - require.Equal(t, 1, seqVal) -} diff --git a/pkg/upgrade/upgrades/tenant_table_migration_test.go b/pkg/upgrade/upgrades/tenant_table_migration_test.go deleted file mode 100644 index f46a59444c16..000000000000 --- a/pkg/upgrade/upgrades/tenant_table_migration_test.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/keys" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/sql/catalog/systemschema" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/stretchr/testify/require" -) - -func TestUpdateTenantsTable(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - clusterArgs := base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey( - clusterversion.V23_1TenantNamesStateAndServiceMode - 1), - }, - }, - }, - } - - var ( - ctx = context.Background() - - tc = testcluster.StartTestCluster(t, 1, clusterArgs) - s = tc.Server(0) - sqlDB = tc.ServerConn(0) - ) - defer tc.Stopper().Stop(ctx) - - var ( - validationSchemas = []upgrades.Schema{ - {Name: "name", ValidationFn: upgrades.HasColumn}, - {Name: "data_state", ValidationFn: upgrades.HasColumn}, - {Name: "service_mode", ValidationFn: upgrades.HasColumn}, - {Name: "tenants_name_idx", ValidationFn: upgrades.HasIndex}, - {Name: "tenants_service_mode_idx", ValidationFn: upgrades.HasIndex}, - } - ) - - // Clear the initial KV pairs set up for the system tenant entry. We - // need to do this because the bootstrap keyspace is initialized in - // the new version and that includes the latest system tenant entry. - // The proper way to do this is to initialize the keyspace in the - // pre-migration state. - // TODO(sql-schema): Bootstrap in the old version so that this - // DelRange is not necessary. - _, err := s.DB().DelRange(ctx, - keys.SystemSQLCodec.TablePrefix(keys.TenantsTableID), - keys.SystemSQLCodec.TablePrefix(keys.TenantsTableID).PrefixEnd(), - false, /* returnKeys */ - ) - require.NoError(t, err) - - // Validate that the table sql_instances has the old schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.TenantsTableID, - systemschema.TenantsTable, - []string{}, - validationSchemas, - false, /* expectExists */ - ) - // Run the upgrade. - upgrades.Upgrade( - t, - sqlDB, - clusterversion.V23_1TenantNamesStateAndServiceMode, - nil, /* done */ - false, /* expectError */ - ) - // Validate that the table has new schema. - upgrades.ValidateSchemaExists( - ctx, - t, - s, - sqlDB, - keys.TenantsTableID, - systemschema.TenantsTable, - []string{}, - validationSchemas, - true, /* expectExists */ - ) - - // Verify that we can do simple operations with the new schema. - _, err = sqlDB.Exec("CREATE TENANT foo") - require.NoError(t, err) - _, err = sqlDB.Exec("ALTER TENANT foo START SERVICE SHARED") - require.NoError(t, err) -} diff --git a/pkg/upgrade/upgrades/upgrades.go b/pkg/upgrade/upgrades/upgrades.go index f7ff3a9ec1bc..b43a79d6ddfa 100644 --- a/pkg/upgrade/upgrades/upgrades.go +++ b/pkg/upgrade/upgrades/upgrades.go @@ -97,7 +97,6 @@ var upgrades = []upgradebase.Upgrade{ ensureSQLSchemaTelemetrySchedule, "add default SQL schema telemetry schedule", ), - firstUpgradeTowardsV23_1, upgrade.NewTenantUpgrade("add columns to system.tenants and populate a system tenant entry", toCV(clusterversion.V23_1TenantNamesStateAndServiceMode), upgrade.NoPrecondition, @@ -337,13 +336,6 @@ var upgrades = []upgradebase.Upgrade{ } var ( - firstUpgradeTowardsV23_1 = upgrade.NewTenantUpgrade( - "prepare upgrade to v23.1 release", - toCV(clusterversion.V23_1Start), - FirstUpgradeFromReleasePrecondition, - NoTenantUpgradeFunc, - ) - firstUpgradeTowardsV23_2 = upgrade.NewTenantUpgrade( "prepare upgrade to v23.2 release", toCV(clusterversion.V23_2Start), @@ -353,11 +345,8 @@ var ( // This slice must contain all upgrades bound to V??_?Start cluster // version keys. These should have FirstUpgradeFromReleasePrecondition as a - // precondition and FirstUpgradeFromRelease as the upgrade function itself, - // except for V23_1Start which remains a no-op, due to this functionality - // having been added in the 23.2 release cycle. + // precondition and FirstUpgradeFromRelease as the upgrade function. firstUpgradesAfterPreExistingReleases = []upgradebase.Upgrade{ - firstUpgradeTowardsV23_1, firstUpgradeTowardsV23_2, } ) diff --git a/pkg/upgrade/upgrades/wait_for_del_range_in_gc_job_test.go b/pkg/upgrade/upgrades/wait_for_del_range_in_gc_job_test.go deleted file mode 100644 index d049f7d905b7..000000000000 --- a/pkg/upgrade/upgrades/wait_for_del_range_in_gc_job_test.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2022 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/jobs" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/settings/cluster" - "github.com/cockroachdb/cockroach/pkg/sql" - "github.com/cockroachdb/cockroach/pkg/storage" - "github.com/cockroachdb/cockroach/pkg/testutils" - "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/cockroachdb/cockroach/pkg/util/log" - "github.com/cockroachdb/errors" - "github.com/stretchr/testify/require" -) - -func TestWaitForDelRangeInGCJob(t *testing.T) { - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - - var ( - v0 = clusterversion.TestingBinaryMinSupportedVersion - v1 = clusterversion.ByKey(clusterversion.V23_1WaitedForDelRangeInGCJob) - ) - - ctx := context.Background() - settings := cluster.MakeTestingClusterSettingsWithVersions(v1, v0, false /* initializeVersion */) - require.NoError(t, clusterversion.Initialize(ctx, v0, &settings.SV)) - storage.MVCCRangeTombstonesEnabledInMixedClusters.Override(ctx, &settings.SV, false) - testServer, sqlDB, kvDB := serverutils.StartServer(t, base.TestServerArgs{ - Settings: settings, - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BinaryVersionOverride: v0, - }, - JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(), - }, - }) - defer testServer.Stopper().Stop(ctx) - - tdb := sqlutils.MakeSQLRunner(sqlDB) - tdb.Exec(t, `SET CLUSTER SETTING jobs.debug.pausepoints = $1`, - `gcjob.before_resume`) - tdb.Exec(t, `SET CLUSTER SETTING jobs.registry.retry.max_delay = '10s'`) - execStmts := func(t *testing.T, stmts ...string) { - for _, stmt := range stmts { - tdb.Exec(t, stmt) - } - } - execStmts(t, - "CREATE DATABASE db", - "CREATE TABLE db.foo(i int primary key, j int)", - "INSERT INTO db.foo(i) SELECT * FROM generate_series(1, 1000)", - "CREATE TABLE foo (i int primary key, j int, index idx(j))", - "INSERT INTO foo(i) SELECT * FROM generate_series(1, 1000)", - ) - - var beforeDrop string - tdb.QueryRow(t, "SELECT cluster_logical_timestamp()").Scan(&beforeDrop) - - // Grab the table ID for db.foo and the table id and index ID for foo. - var dbFooID, fooID, idxID uint32 - tdb.QueryRow(t, ` -SELECT 'db.foo'::REGCLASS::INT8, - 'foo'::REGCLASS::INT8, - ( - SELECT index_id - FROM crdb_internal.table_indexes - WHERE descriptor_id = 'foo'::REGCLASS AND index_name = 'idx' - );`).Scan(&dbFooID, &fooID, &idxID) - execStmts(t, - "DROP DATABASE db CASCADE", - "DROP INDEX foo@idx", - ) - - // One for the index, one for the database. - tdb.CheckQueryResultsRetry(t, ` -SELECT count(*) - FROM crdb_internal.jobs - WHERE job_type = 'SCHEMA CHANGE GC' - AND status = 'paused'`, - [][]string{{"2"}}) - tdb.ExpectErr(t, `verifying precondition for version \d*22.2-\d+: `+ - `paused GC jobs prevent upgrading GC job behavior: \[\d+ \d+]`, - "SET CLUSTER SETTING version = crdb_internal.node_executable_version()") - - tdb.Exec(t, `SET CLUSTER SETTING jobs.debug.pausepoints = DEFAULT`) - - // Now resume the jobs. - tdb.Exec(t, - "RESUME JOBS SELECT job_id FROM crdb_internal.jobs WHERE status = 'paused'") - - // Upgrade the version. Then ensure that the data has been - // removed from the span but the jobs are still running. - tdb.Exec(t, "SET CLUSTER SETTING version = crdb_internal.node_executable_version()") - - codec := testServer.ExecutorConfig().(sql.ExecutorConfig).Codec - testutils.SucceedsSoon(t, - func() error { - { - dbFooStart := codec.TablePrefix(dbFooID) - res, err := kvDB.Scan(ctx, dbFooStart, dbFooStart.PrefixEnd(), 1) - if err != nil { - return err - } - if len(res) != 0 { - return errors.AssertionFailedf("unexpected number of table keys (got %d)", len(res)) - } - } - { - idxStart := codec.IndexPrefix(fooID, idxID) - res, err := kvDB.Scan(ctx, idxStart, idxStart.PrefixEnd(), 1) - require.NoError(t, err) - if err != nil { - return err - } - if len(res) != 0 { - return errors.AssertionFailedf("unexpected number of index keys (got %d)", len(res)) - } - } - return nil - }) - - // Make sure that there is still MVCC history. - tdb.CheckQueryResults(t, "SELECT count(*) FROM foo@idx AS OF SYSTEM TIME "+beforeDrop, - [][]string{{"1000"}}) -} diff --git a/pkg/upgrade/upgrades/web_sessions_table_user_id_migration_test.go b/pkg/upgrade/upgrades/web_sessions_table_user_id_migration_test.go deleted file mode 100644 index 24007faee458..000000000000 --- a/pkg/upgrade/upgrades/web_sessions_table_user_id_migration_test.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2023 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package upgrades_test - -import ( - "context" - gosql "database/sql" - "fmt" - "strconv" - "testing" - - "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/clusterversion" - "github.com/cockroachdb/cockroach/pkg/server" - "github.com/cockroachdb/cockroach/pkg/testutils/skip" - "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" - "github.com/cockroachdb/cockroach/pkg/testutils/testcluster" - "github.com/cockroachdb/cockroach/pkg/upgrade/upgrades" - "github.com/cockroachdb/cockroach/pkg/util/leaktest" - "github.com/stretchr/testify/require" -) - -func TestWebSessionsUserIDMigrationNoUsers(t *testing.T) { - runTestWebSessionsUserIDMigration(t, 0) -} - -func TestWebSessionsUserIDMigration10Users(t *testing.T) { - runTestWebSessionsUserIDMigration(t, 10) -} - -func TestWebSessionsUserIDMigration1500Users(t *testing.T) { - skip.UnderRace(t) - skip.UnderStress(t) - runTestWebSessionsUserIDMigration(t, 1500) -} - -func runTestWebSessionsUserIDMigration(t *testing.T, numUsers int) { - defer leaktest.AfterTest(t)() - ctx := context.Background() - - tc := testcluster.StartTestCluster(t, 1 /* nodes */, base.TestClusterArgs{ - ServerArgs: base.TestServerArgs{ - Knobs: base.TestingKnobs{ - Server: &server.TestingKnobs{ - DisableAutomaticVersionUpgrade: make(chan struct{}), - BootstrapVersionKeyOverride: clusterversion.V22_2, - BinaryVersionOverride: clusterversion.ByKey(clusterversion.V23_1WebSessionsTableHasUserIDColumn - 1), - }, - }, - }, - }) - defer tc.Stopper().Stop(ctx) - - db := tc.ServerConn(0) - defer db.Close() - tdb := sqlutils.MakeSQLRunner(db) - - // Create test users. - upgrades.ExecForCountInTxns(ctx, t, db, numUsers, 100 /* txCount */, func(tx *gosql.Tx, i int) error { - if _, err := tx.Exec(fmt.Sprintf("CREATE USER testuser%d", i)); err != nil { - return err - } - // Simulate the INSERT that happens in the actual authentication code. - if _, err := tx.Exec(fmt.Sprintf(` -INSERT INTO system.web_sessions ("hashedSecret", username, "createdAt", "expiresAt", "lastUsedAt") -VALUES ( - '\xe77edd369fc3a955a129d2ced69d97717eeee49912e4369a2b687a4d8c36f798', - 'testuser%d', - '2023-02-14 20:56:30.699447', - '2023-02-21 20:56:30.699242', - '2023-02-14 20:56:30.699447' -) -`, i)); err != nil { - return err - } - return nil - }) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.web_sessions", [][]string{{strconv.Itoa(numUsers)}}) - - // Drop a user to test that migration deletes orphaned rows. - if numUsers > 0 { - tdb.Exec(t, "DROP USER testuser0") - numUsers -= 1 - } - - // Run migrations. - _, err := tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1WebSessionsTableHasUserIDColumn).String()) - require.NoError(t, err) - _, err = tc.Conns[0].ExecContext(ctx, `SET CLUSTER SETTING version = $1`, - clusterversion.ByKey(clusterversion.V23_1WebSessionsTableUserIDColumnBackfilled).String()) - require.NoError(t, err) - - // Verify that the final schema matches the expected one. - expectedSchema := `CREATE TABLE public.web_sessions ( - id INT8 NOT NULL DEFAULT unique_rowid(), - "hashedSecret" BYTES NOT NULL, - username STRING NOT NULL, - "createdAt" TIMESTAMP NOT NULL DEFAULT now():::TIMESTAMP, - "expiresAt" TIMESTAMP NOT NULL, - "revokedAt" TIMESTAMP NULL, - "lastUsedAt" TIMESTAMP NOT NULL DEFAULT now():::TIMESTAMP, - "auditInfo" STRING NULL, - user_id OID NOT NULL, - CONSTRAINT "primary" PRIMARY KEY (id ASC), - INDEX "web_sessions_expiresAt_idx" ("expiresAt" ASC), - INDEX "web_sessions_createdAt_idx" ("createdAt" ASC), - INDEX "web_sessions_revokedAt_idx" ("revokedAt" ASC), - INDEX "web_sessions_lastUsedAt_idx" ("lastUsedAt" ASC), - FAMILY "fam_0_id_hashedSecret_username_createdAt_expiresAt_revokedAt_lastUsedAt_auditInfo" (id, "hashedSecret", username, "createdAt", "expiresAt", "revokedAt", "lastUsedAt", "auditInfo", user_id) -)` - r := tdb.QueryRow(t, "SELECT create_statement FROM [SHOW CREATE TABLE system.web_sessions]") - var actualSchema string - r.Scan(&actualSchema) - require.Equal(t, expectedSchema, actualSchema) - - // Check that the backfill was successful and correct. - tdb.CheckQueryResults(t, "SELECT * FROM system.web_sessions WHERE user_id IS NULL", [][]string{}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.web_sessions", [][]string{{strconv.Itoa(numUsers)}}) - tdb.CheckQueryResults(t, "SELECT count(*) FROM system.web_sessions AS a JOIN system.users AS b ON a.username = b.username AND a.user_id <> b.user_id", [][]string{{"0"}}) -} diff --git a/pkg/workload/schemachange/operation_generator.go b/pkg/workload/schemachange/operation_generator.go index f3e5acdfa0c6..31b035de58d9 100644 --- a/pkg/workload/schemachange/operation_generator.go +++ b/pkg/workload/schemachange/operation_generator.go @@ -337,15 +337,15 @@ var opDeclarative = []bool{ // The declarative schema changer builder does have a supported list, but it's not // sufficient for that reason. var opDeclarativeVersion = []clusterversion.Key{ - addColumn: clusterversion.V22_2, - addForeignKeyConstraint: clusterversion.V23_1, - addUniqueConstraint: clusterversion.V23_1, - createIndex: clusterversion.V23_1, - createSequence: clusterversion.V23_2, - dropColumn: clusterversion.V22_2, - dropColumnNotNull: clusterversion.V23_1, - dropConstraint: clusterversion.V23_1, - dropIndex: clusterversion.V23_1, + addColumn: clusterversion.BinaryMinSupportedVersionKey, + addForeignKeyConstraint: clusterversion.BinaryMinSupportedVersionKey, + addUniqueConstraint: clusterversion.BinaryMinSupportedVersionKey, + createIndex: clusterversion.BinaryMinSupportedVersionKey, + createSequence: clusterversion.BinaryMinSupportedVersionKey, + dropColumn: clusterversion.BinaryMinSupportedVersionKey, + dropColumnNotNull: clusterversion.BinaryMinSupportedVersionKey, + dropConstraint: clusterversion.BinaryMinSupportedVersionKey, + dropIndex: clusterversion.BinaryMinSupportedVersionKey, dropSequence: clusterversion.BinaryMinSupportedVersionKey, dropTable: clusterversion.BinaryMinSupportedVersionKey, dropView: clusterversion.BinaryMinSupportedVersionKey,