diff --git a/pkg/cli/interactive_tests/test_demo_global.tcl b/pkg/cli/interactive_tests/test_demo_global.tcl index 61a4909c33bd..e8b0c77ec368 100644 --- a/pkg/cli/interactive_tests/test_demo_global.tcl +++ b/pkg/cli/interactive_tests/test_demo_global.tcl @@ -13,6 +13,13 @@ spawn $argv demo --empty --nodes 9 --global # Ensure db is defaultdb. eexpect "defaultdb>" +# Ensure regions display correctly. +send "SELECT region, zones FROM \[SHOW REGIONS FROM CLUSTER\] ORDER BY region;\r" +eexpect " europe-west1 | {b,c,d}" +eexpect " us-east1 | {b,c,d}" +eexpect " us-west1 | {a,b,c}" +eexpect "defaultdb>" + interrupt eexpect eof end_test diff --git a/pkg/sql/delegate/show_regions.go b/pkg/sql/delegate/show_regions.go index 29a65bb9dc64..028903b26db4 100644 --- a/pkg/sql/delegate/show_regions.go +++ b/pkg/sql/delegate/show_regions.go @@ -36,6 +36,7 @@ func (d *delegator) delegateShowRegions(n *tree.ShowRegions) (tree.Statement, er 'zone=([^,]*)' ) ) + ORDER BY locality ), NULL )