From a42f02614939cb7c8520c455cd48121b9e900fcc Mon Sep 17 00:00:00 2001 From: Lucy Zhang Date: Mon, 19 Oct 2020 12:15:39 -0400 Subject: [PATCH] clusterversion: remove unused timestamp-related cluster versions Remove `VersionTimeTZType` and `VersionTimePrecision`, which are unused. Release note: None --- pkg/clusterversion/cockroach_versions.go | 12 ------ pkg/clusterversion/versionkey_string.go | 54 ++++++++++++------------ 2 files changed, 26 insertions(+), 40 deletions(-) diff --git a/pkg/clusterversion/cockroach_versions.go b/pkg/clusterversion/cockroach_versions.go index 732740f176a9..6c6383580666 100644 --- a/pkg/clusterversion/cockroach_versions.go +++ b/pkg/clusterversion/cockroach_versions.go @@ -52,8 +52,6 @@ const ( VersionStatementDiagnosticsSystemTables VersionSchemaChangeJob VersionSavepoints - VersionTimeTZType - VersionTimePrecision Version20_1 VersionStart20_2 VersionGeospatialType @@ -293,16 +291,6 @@ var versionsSingleton = keyedVersions([]keyedVersion{ Key: VersionSavepoints, Version: roachpb.Version{Major: 19, Minor: 2, Unstable: 16}, }, - { - // VersionTimeTZType enables the use of the TimeTZ data type. - Key: VersionTimeTZType, - Version: roachpb.Version{Major: 19, Minor: 2, Unstable: 17}, - }, - { - // VersionTimePrecision enables the use of precision with time/intervals. - Key: VersionTimePrecision, - Version: roachpb.Version{Major: 19, Minor: 2, Unstable: 18}, - }, { // Version20_1 is CockroachDB v20.1. It's used for all v20.1.x patch releases. Key: Version20_1, diff --git a/pkg/clusterversion/versionkey_string.go b/pkg/clusterversion/versionkey_string.go index d51390813a63..e910d0f23e65 100644 --- a/pkg/clusterversion/versionkey_string.go +++ b/pkg/clusterversion/versionkey_string.go @@ -28,37 +28,35 @@ func _() { _ = x[VersionStatementDiagnosticsSystemTables-17] _ = x[VersionSchemaChangeJob-18] _ = x[VersionSavepoints-19] - _ = x[VersionTimeTZType-20] - _ = x[VersionTimePrecision-21] - _ = x[Version20_1-22] - _ = x[VersionStart20_2-23] - _ = x[VersionGeospatialType-24] - _ = x[VersionEnums-25] - _ = x[VersionRangefeedLeases-26] - _ = x[VersionAlterColumnTypeGeneral-27] - _ = x[VersionAlterSystemJobsAddCreatedByColumns-28] - _ = x[VersionAddScheduledJobsTable-29] - _ = x[VersionUserDefinedSchemas-30] - _ = x[VersionNoOriginFKIndexes-31] - _ = x[VersionClientRangeInfosOnBatchResponse-32] - _ = x[VersionNodeMembershipStatus-33] - _ = x[VersionRangeStatsRespHasDesc-34] - _ = x[VersionMinPasswordLength-35] - _ = x[VersionAbortSpanBytes-36] - _ = x[VersionAlterSystemJobsAddSqllivenessColumnsAddNewSystemSqllivenessTable-37] - _ = x[VersionMaterializedViews-38] - _ = x[VersionBox2DType-39] - _ = x[VersionLeasedDatabaseDescriptors-40] - _ = x[VersionUpdateScheduledJobsSchema-41] - _ = x[VersionCreateLoginPrivilege-42] - _ = x[VersionHBAForNonTLS-43] - _ = x[Version20_2-44] - _ = x[VersionStart21_1-45] + _ = x[Version20_1-20] + _ = x[VersionStart20_2-21] + _ = x[VersionGeospatialType-22] + _ = x[VersionEnums-23] + _ = x[VersionRangefeedLeases-24] + _ = x[VersionAlterColumnTypeGeneral-25] + _ = x[VersionAlterSystemJobsAddCreatedByColumns-26] + _ = x[VersionAddScheduledJobsTable-27] + _ = x[VersionUserDefinedSchemas-28] + _ = x[VersionNoOriginFKIndexes-29] + _ = x[VersionClientRangeInfosOnBatchResponse-30] + _ = x[VersionNodeMembershipStatus-31] + _ = x[VersionRangeStatsRespHasDesc-32] + _ = x[VersionMinPasswordLength-33] + _ = x[VersionAbortSpanBytes-34] + _ = x[VersionAlterSystemJobsAddSqllivenessColumnsAddNewSystemSqllivenessTable-35] + _ = x[VersionMaterializedViews-36] + _ = x[VersionBox2DType-37] + _ = x[VersionLeasedDatabaseDescriptors-38] + _ = x[VersionUpdateScheduledJobsSchema-39] + _ = x[VersionCreateLoginPrivilege-40] + _ = x[VersionHBAForNonTLS-41] + _ = x[Version20_2-42] + _ = x[VersionStart21_1-43] } -const _VersionKey_name = "Version19_1VersionAtomicChangeReplicasTriggerVersionAtomicChangeReplicasVersionPartitionedBackupVersion19_2VersionStart20_1VersionContainsEstimatesCounterVersionChangeReplicasDemotionVersionSecondaryIndexColumnFamiliesVersionNamespaceTableWithSchemasVersionProtectedTimestampsVersionPrimaryKeyChangesVersionAuthLocalAndTrustRejectMethodsVersionPrimaryKeyColumnsOutOfFamilyZeroVersionNoExplicitForeignKeyIndexIDsVersionHashShardedIndexesVersionCreateRolePrivilegeVersionStatementDiagnosticsSystemTablesVersionSchemaChangeJobVersionSavepointsVersionTimeTZTypeVersionTimePrecisionVersion20_1VersionStart20_2VersionGeospatialTypeVersionEnumsVersionRangefeedLeasesVersionAlterColumnTypeGeneralVersionAlterSystemJobsAddCreatedByColumnsVersionAddScheduledJobsTableVersionUserDefinedSchemasVersionNoOriginFKIndexesVersionClientRangeInfosOnBatchResponseVersionNodeMembershipStatusVersionRangeStatsRespHasDescVersionMinPasswordLengthVersionAbortSpanBytesVersionAlterSystemJobsAddSqllivenessColumnsAddNewSystemSqllivenessTableVersionMaterializedViewsVersionBox2DTypeVersionLeasedDatabaseDescriptorsVersionUpdateScheduledJobsSchemaVersionCreateLoginPrivilegeVersionHBAForNonTLSVersion20_2VersionStart21_1" +const _VersionKey_name = "Version19_1VersionAtomicChangeReplicasTriggerVersionAtomicChangeReplicasVersionPartitionedBackupVersion19_2VersionStart20_1VersionContainsEstimatesCounterVersionChangeReplicasDemotionVersionSecondaryIndexColumnFamiliesVersionNamespaceTableWithSchemasVersionProtectedTimestampsVersionPrimaryKeyChangesVersionAuthLocalAndTrustRejectMethodsVersionPrimaryKeyColumnsOutOfFamilyZeroVersionNoExplicitForeignKeyIndexIDsVersionHashShardedIndexesVersionCreateRolePrivilegeVersionStatementDiagnosticsSystemTablesVersionSchemaChangeJobVersionSavepointsVersion20_1VersionStart20_2VersionGeospatialTypeVersionEnumsVersionRangefeedLeasesVersionAlterColumnTypeGeneralVersionAlterSystemJobsAddCreatedByColumnsVersionAddScheduledJobsTableVersionUserDefinedSchemasVersionNoOriginFKIndexesVersionClientRangeInfosOnBatchResponseVersionNodeMembershipStatusVersionRangeStatsRespHasDescVersionMinPasswordLengthVersionAbortSpanBytesVersionAlterSystemJobsAddSqllivenessColumnsAddNewSystemSqllivenessTableVersionMaterializedViewsVersionBox2DTypeVersionLeasedDatabaseDescriptorsVersionUpdateScheduledJobsSchemaVersionCreateLoginPrivilegeVersionHBAForNonTLSVersion20_2VersionStart21_1" -var _VersionKey_index = [...]uint16{0, 11, 45, 72, 96, 107, 123, 154, 183, 218, 250, 276, 300, 337, 376, 411, 436, 462, 501, 523, 540, 557, 577, 588, 604, 625, 637, 659, 688, 729, 757, 782, 806, 844, 871, 899, 923, 944, 1015, 1039, 1055, 1087, 1119, 1146, 1165, 1176, 1192} +var _VersionKey_index = [...]uint16{0, 11, 45, 72, 96, 107, 123, 154, 183, 218, 250, 276, 300, 337, 376, 411, 436, 462, 501, 523, 540, 551, 567, 588, 600, 622, 651, 692, 720, 745, 769, 807, 834, 862, 886, 907, 978, 1002, 1018, 1050, 1082, 1109, 1128, 1139, 1155} func (i VersionKey) String() string { if i < 0 || i >= VersionKey(len(_VersionKey_index)-1) {