Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delegate: remove is_active_region from SHOW REGIONS FROM DATABASE #58982

Merged
merged 1 commit into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pkg/sql/delegate/show_regions.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ SELECT
r.name AS "database",
r.region as "region",
r.region = r.primary_region AS "primary",
zones_table.region IS NOT NULL AS is_region_active,
COALESCE(zones_table.zones, '{}'::string[])
AS
zones
Expand Down
60 changes: 30 additions & 30 deletions pkg/sql/logictest/testdata/logic_test/multiregion
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ test {} NULL
statement ok
USE multi_region_test_db

query TTBBT colnames
query TTBT colnames
SHOW REGIONS FROM DATABASE
----
database region primary is_region_active zones
multi_region_test_db ap-southeast-2 false true {ap-az1,ap-az2,ap-az3}
multi_region_test_db ca-central-1 true true {ca-az1,ca-az2,ca-az3}
multi_region_test_db us-east-1 false true {us-az1,us-az2,us-az3}
database region primary zones
multi_region_test_db ap-southeast-2 false {ap-az1,ap-az2,ap-az3}
multi_region_test_db ca-central-1 true {ca-az1,ca-az2,ca-az3}
multi_region_test_db us-east-1 false {us-az1,us-az2,us-az3}

query TTTT colnames
SHOW REGIONS
Expand All @@ -141,11 +141,11 @@ SHOW SURVIVAL GOAL FROM DATABASE
----
multi_region_test_db region

query TTBBT colnames
query TTBT colnames
SHOW REGIONS FROM DATABASE region_test_db
----
database region primary is_region_active zones
region_test_db ap-southeast-2 true true {ap-az1,ap-az2,ap-az3}
database region primary zones
region_test_db ap-southeast-2 true {ap-az1,ap-az2,ap-az3}

query TT
SHOW SURVIVAL GOAL FROM DATABASE region_test_db
Expand Down Expand Up @@ -371,12 +371,12 @@ public crdb_internal_region {ca-central-1} root
statement ok
ALTER DATABASE alter_test_db ADD REGION "ap-southeast-2"

query TTBBT colnames
query TTBT colnames
show regions from database alter_test_db
----
database region primary is_region_active zones
alter_test_db ap-southeast-2 false true {ap-az1,ap-az2,ap-az3}
alter_test_db ca-central-1 true true {ca-az1,ca-az2,ca-az3}
database region primary zones
alter_test_db ap-southeast-2 false {ap-az1,ap-az2,ap-az3}
alter_test_db ca-central-1 true {ca-az1,ca-az2,ca-az3}

query TTTT colnames
SHOW ENUMS FROM alter_test_db.public
Expand All @@ -399,13 +399,13 @@ DATABASE alter_test_db ALTER DATABASE alter_test_db CONFIGURE ZONE USING
statement ok
ALTER DATABASE alter_test_db ADD REGION "us-east-1"

query TTBBT colnames
query TTBT colnames
show regions from database alter_test_db
----
database region primary is_region_active zones
alter_test_db ap-southeast-2 false true {ap-az1,ap-az2,ap-az3}
alter_test_db ca-central-1 true true {ca-az1,ca-az2,ca-az3}
alter_test_db us-east-1 false true {us-az1,us-az2,us-az3}
database region primary zones
alter_test_db ap-southeast-2 false {ap-az1,ap-az2,ap-az3}
alter_test_db ca-central-1 true {ca-az1,ca-az2,ca-az3}
alter_test_db us-east-1 false {us-az1,us-az2,us-az3}

query TTTT colnames
SHOW ENUMS FROM alter_test_db.public
Expand Down Expand Up @@ -454,10 +454,10 @@ RANGE default ALTER RANGE default CONFIGURE ZONE USING
constraints = '[]',
lease_preferences = '[]'

query TTBBT colnames
query TTBT colnames
show regions from database primary_region_db
----
database region primary is_region_active zones
database region primary zones

query TTTT colnames
SHOW ENUMS FROM primary_region_db.public
Expand All @@ -481,11 +481,11 @@ DATABASE primary_region_db ALTER DATABASE primary_region_db CONFIGURE ZONE USIN
constraints = '{+region=ca-central-1: 1}',
lease_preferences = '[[+region=ca-central-1]]'

query TTBBT colnames
query TTBT colnames
show regions from database primary_region_db
----
database region primary is_region_active zones
primary_region_db ca-central-1 true true {ca-az1,ca-az2,ca-az3}
database region primary zones
primary_region_db ca-central-1 true {ca-az1,ca-az2,ca-az3}

query TTTT colnames
SHOW ENUMS FROM primary_region_db.public
Expand Down Expand Up @@ -516,12 +516,12 @@ SHOW ENUMS FROM primary_region_db.public
schema name values owner
public crdb_internal_region {ap-southeast-2,ca-central-1} root

query TTBBT colnames
query TTBT colnames
show regions from database primary_region_db
----
database region primary is_region_active zones
primary_region_db ap-southeast-2 false true {ap-az1,ap-az2,ap-az3}
primary_region_db ca-central-1 true true {ca-az1,ca-az2,ca-az3}
database region primary zones
primary_region_db ap-southeast-2 false {ap-az1,ap-az2,ap-az3}
primary_region_db ca-central-1 true {ca-az1,ca-az2,ca-az3}

statement ok
ALTER DATABASE primary_region_db PRIMARY REGION "ap-southeast-2"
Expand All @@ -543,9 +543,9 @@ SHOW ENUMS FROM primary_region_db.public
schema name values owner
public crdb_internal_region {ap-southeast-2,ca-central-1} root

query TTBBT colnames
query TTBT colnames
show regions from database primary_region_db
----
database region primary is_region_active zones
primary_region_db ap-southeast-2 true true {ap-az1,ap-az2,ap-az3}
primary_region_db ca-central-1 false true {ca-az1,ca-az2,ca-az3}
database region primary zones
primary_region_db ap-southeast-2 true {ap-az1,ap-az2,ap-az3}
primary_region_db ca-central-1 false {ca-az1,ca-az2,ca-az3}