diff --git a/go/mysql/conn_params.go b/go/mysql/conn_params.go index 053e662b165..ae739c9b59c 100644 --- a/go/mysql/conn_params.go +++ b/go/mysql/conn_params.go @@ -34,6 +34,10 @@ type ConnParams struct { SslCert string `json:"ssl_cert"` SslKey string `json:"ssl_key"` ServerName string `json:"server_name"` + + // The following is only set when the deprecated "dbname" flags are + // supplied and will be removed. + DeprecatedDBName string } // EnableSSL will set the right flag on the parameters. diff --git a/go/vt/dbconfigs/dbconfigs.go b/go/vt/dbconfigs/dbconfigs.go index 802a5376c7f..5df9aa2d7da 100644 --- a/go/vt/dbconfigs/dbconfigs.go +++ b/go/vt/dbconfigs/dbconfigs.go @@ -124,6 +124,9 @@ func registerPerUserFlags(dbc *userConfig, userKey string) { flag.StringVar(&dbc.param.SslCaPath, "db-config-"+userKey+"-ssl-ca-path", "", "deprecated: use db_ssl_ca_path") flag.StringVar(&dbc.param.SslCert, "db-config-"+userKey+"-ssl-cert", "", "deprecated: use db_ssl_cert") flag.StringVar(&dbc.param.SslKey, "db-config-"+userKey+"-ssl-key", "", "deprecated: use db_ssl_key") + + flag.StringVar(&dbc.param.DeprecatedDBName, "db-config-"+userKey+"-dbname", "", "deprecated: dbname does not need to be explicitly configured") + } // AppWithDB returns connection parameters for app with dbname set.