Skip to content

Commit

Permalink
Replace database name with @primary
Browse files Browse the repository at this point in the history
If we explicitly pass the database name when connecting to Vitess, we bypass Vitess' transparent query routing capabilities when dealing with multiple keyspaces.

Using `@primary` instead of an explicit keyspace name will allow us to query transparently across all keyspaces as soon as `pscale shell` connects.
  • Loading branch information
lizztheblizz authored Dec 27, 2023
1 parent ea45454 commit c4bcec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cmd/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ second argument:
"-t", // the -s (silent) flag disables tabular output, re-enable it.
"-h", host,
"-P", port,
"-D", database,
"-D", "@primary",
}

historyFile := historyFilePath(ch.Config.Organization, database, branch)
Expand Down

0 comments on commit c4bcec3

Please sign in to comment.