Skip to content

Commit

Permalink
fix: add missing mysql skip_db_creation command line option, fixes RH…
Browse files Browse the repository at this point in the history
…OAIENG-14392

Signed-off-by: Dhiraj Bokde <[email protected]>
  • Loading branch information
dhirajsb committed Oct 17, 2024
1 parent b951b0a commit 1ab8d2d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ml_metadata/metadata_store/metadata_store_server_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ bool ParseMetadataStoreServerConfigOrDie(
// were set and dies if only some of them were provided.
bool ParseMySQLFlagsBasedServerConfigOrDie(
const std::string& host, const int port, const std::string& database,
const std::string& user, const std::string& password,
const std::string& user, const std::string& password, const bool skip_db_creation,
const std::string& sslcert, const std::string& sslkey,
const std::string& sslrootcert, const std::string& sslcapath,
const std::string& sslcipher, const bool verify_server_cert,
Expand All @@ -131,6 +131,7 @@ bool ParseMySQLFlagsBasedServerConfigOrDie(
config->set_database(database);
config->set_user(user);
config->set_password(password);
config->set_skip_db_creation(skip_db_creation);
bool has_ssl_config;
if (!sslcert.empty()) {
has_ssl_config = true;
Expand Down Expand Up @@ -355,6 +356,9 @@ DEFINE_string(mysql_config_user, "",
"The mysql user name to use (Optional parameter)");
DEFINE_string(mysql_config_password, "",
"The mysql user password to use (Optional parameter)");
DEFINE_bool(mysql_config_skip_db_creation, false,
"True if skipping database instance creation during ML Metadata "
"service initialization. By default it is false.");
DEFINE_string(mysql_config_sslcert, "",
"This parameter specifies the file name of the client SSL certificate.");
DEFINE_string(mysql_config_sslkey, "",
Expand Down Expand Up @@ -444,6 +448,7 @@ BuildDefaultConnectionConfig() {
(FLAGS_mysql_config_database),
(FLAGS_mysql_config_user),
(FLAGS_mysql_config_password),
(FLAGS_mysql_config_skip_db_creation),
(FLAGS_mysql_config_sslcert),
(FLAGS_mysql_config_sslkey),
(FLAGS_mysql_config_sslrootcert),
Expand Down Expand Up @@ -490,6 +495,7 @@ BuildMySQLConnectionConfig() {
(FLAGS_mysql_config_database),
(FLAGS_mysql_config_user),
(FLAGS_mysql_config_password),
(FLAGS_mysql_config_skip_db_creation),
(FLAGS_mysql_config_sslcert),
(FLAGS_mysql_config_sslkey),
(FLAGS_mysql_config_sslrootcert),
Expand Down

0 comments on commit 1ab8d2d

Please sign in to comment.