Merge pull request #64 from tsthght/feature/mgr1

when group-replication-mode is default value, need not save into file
This commit is contained in:
tsthght 2018-05-17 15:47:15 +08:00 committed by GitHub
commit 65461dfa1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 7 deletions

View File

@ -1012,7 +1012,11 @@ show_group_replication_mode(gpointer param) {
return g_strdup_printf("%d", srv->group_replication_mode);
}
if(CAN_SAVE_OPTS_PROPERTY(opt_type)) {
return g_strdup_printf("%d", srv->group_replication_mode);
if(srv->group_replication_mode == 0) {
return NULL;
} else {
return g_strdup_printf("%d", srv->group_replication_mode);
}
}
return NULL;
}

View File

@ -802,12 +802,6 @@ main_cmdline(int argc, char **argv)
}
}
if(frontend->group_replication_mode != 0 && frontend->group_replication_mode != 1) {
g_critical("group-replication-mode is invalid, current value is %d", frontend->group_replication_mode);
GOTO_EXIT(EXIT_FAILURE);
}
srv->group_replication_mode = frontend->group_replication_mode;
if (chassis_frontend_init_basedir(argv[0], &(frontend->base_dir))) {
GOTO_EXIT(EXIT_FAILURE);
}
@ -986,6 +980,12 @@ main_cmdline(int argc, char **argv)
}
}
if(frontend->group_replication_mode != 0 && frontend->group_replication_mode != 1) {
g_critical("group-replication-mode is invalid, current value is %d", frontend->group_replication_mode);
GOTO_EXIT(EXIT_FAILURE);
}
srv->group_replication_mode = frontend->group_replication_mode;
/*
* log the versions of all loaded plugins
*/