Skip to content

Commit

Permalink
cli: remove cockroach dump from CRDB
Browse files Browse the repository at this point in the history
Previously we maintained both BACKUP and dump as BACKUP was
enterprise-only but in 20.2+ basic backup that can do at least as much
as dump can is free so this is no longer a reason to keep dump.

More detailed explanation at #54040.

Fixes: #56405
  • Loading branch information
adityamaru committed Nov 23, 2020
1 parent 3cfc3de commit 6d2d444
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 2,394 deletions.
17 changes: 0 additions & 17 deletions pkg/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ go_library(
"demo_cluster.go",
"demo_telemetry.go",
"doctor.go",
"dump.go",
"error.go",
"examples.go",
"flags.go",
Expand Down Expand Up @@ -115,7 +114,6 @@ go_library(
"//pkg/sql/catalog/catconstants",
"//pkg/sql/catalog/descpb",
"//pkg/sql/catalog/tabledesc",
"//pkg/sql/catalog/typedesc",
"//pkg/sql/doctor",
"//pkg/sql/execinfrapb",
"//pkg/sql/lex",
Expand All @@ -127,9 +125,7 @@ go_library(
"//pkg/sql/row",
"//pkg/sql/sem/builtins",
"//pkg/sql/sem/tree",
"//pkg/sql/sessiondata",
"//pkg/sql/sessiondatapb",
"//pkg/sql/types",
"//pkg/sqlmigrations",
"//pkg/storage",
"//pkg/storage/cloud",
Expand All @@ -138,7 +134,6 @@ go_library(
"//pkg/ts/tspb",
"//pkg/util",
"//pkg/util/contextutil",
"//pkg/util/ctxgroup",
"//pkg/util/encoding",
"//pkg/util/encoding/csv",
"//pkg/util/envutil",
Expand All @@ -161,8 +156,6 @@ go_library(
"//pkg/util/stop",
"//pkg/util/syncutil",
"//pkg/util/sysutil",
"//pkg/util/timeofday",
"//pkg/util/timetz",
"//pkg/util/timeutil",
"//pkg/util/tracing",
"//pkg/util/uuid",
Expand Down Expand Up @@ -194,7 +187,6 @@ go_library(
"//vendor/github.com/kr/pretty",
"//vendor/github.com/lib/pq",
"//vendor/github.com/lib/pq/auth/kerberos",
"//vendor/github.com/lib/pq/oid",
"//vendor/github.com/mattn/go-isatty",
"//vendor/github.com/olekukonko/tablewriter",
"//vendor/github.com/spf13/cobra",
Expand Down Expand Up @@ -265,7 +257,6 @@ go_test(
"demo_locality_test.go",
"demo_test.go",
"doctor_test.go",
"dump_test.go",
"error_test.go",
"flags_test.go",
"haproxy_test.go",
Expand Down Expand Up @@ -318,22 +309,14 @@ go_test(
"//pkg/testutils/sqlutils",
"//pkg/testutils/testcluster",
"//pkg/util",
"//pkg/util/bitarray",
"//pkg/util/duration",
"//pkg/util/ipaddr",
"//pkg/util/json",
"//pkg/util/leaktest",
"//pkg/util/log",
"//pkg/util/log/logflags",
"//pkg/util/log/severity",
"//pkg/util/protoutil",
"//pkg/util/randutil",
"//pkg/util/stop",
"//pkg/util/timeutil",
"//pkg/util/timeutil/pgdate",
"//pkg/util/uuid",
"//pkg/workload/examples",
"//vendor/github.com/cockroachdb/apd/v2:apd",
"//vendor/github.com/cockroachdb/datadriven",
"//vendor/github.com/cockroachdb/errors",
"//vendor/github.com/cockroachdb/pebble",
Expand Down
1 change: 0 additions & 1 deletion pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ func init() {
stmtDiagCmd,
authCmd,
nodeCmd,
dumpCmd,
nodeLocalCmd,
userFileCmd,
importCmd,
Expand Down
15 changes: 0 additions & 15 deletions pkg/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2042,21 +2042,6 @@ func Example_sqlfmt() {
// SELECT (1 + 2) + 3
}

func Example_dump_no_visible_columns() {
c := newCLITest(cliTestParams{})
defer c.cleanup()

c.RunWithArgs([]string{"sql", "-e", "create table t(x int); set sql_safe_updates=false; alter table t drop x"})
c.RunWithArgs([]string{"dump", "defaultdb"})

// Output:
// sql -e create table t(x int); set sql_safe_updates=false; alter table t drop x
// ALTER TABLE
// dump defaultdb
// CREATE TABLE public.t (FAMILY "primary" (rowid)
// );
}

// Example_read_from_file tests the -f parameter.
// The input file contains a mix of client-side and
// server-side commands to ensure that both are supported with -f.
Expand Down
Loading

0 comments on commit 6d2d444

Please sign in to comment.