From 6ccb9ebda44498a7e14a16bb6ed45bc01f196e42 Mon Sep 17 00:00:00 2001 From: z00585807 Date: Tue, 9 Mar 2021 17:20:38 +0800 Subject: [PATCH] fix bug about gs_guc set --- src/bin/gs_guc/pg_guc.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/bin/gs_guc/pg_guc.cpp b/src/bin/gs_guc/pg_guc.cpp index 7b3883b44..5e22f8b80 100644 --- a/src/bin/gs_guc/pg_guc.cpp +++ b/src/bin/gs_guc/pg_guc.cpp @@ -1229,17 +1229,12 @@ do_gucset(const char *action_type, const char *data_dir) to_generatenewline(optconf_line, newconf_line, config_param[i], config_value[i], optvalue_len); } else { /* - * if parameter as value is NULL; consider it as UNSET (i.e to default value) - * which means comment the configuration parameter + * if parameter value is NULL; not consider it as UNSET, + * which means maintain the configuration parameter, and + * there will be prompts telling the user to assign a value. */ - //line is commented - if (isOptLineCommented(optconf_line)) { - rc = strncpy_s(newconf_line, MAX_PARAM_LEN*2, optconf_line, (size_t)Min(line_len, MAX_PARAM_LEN*2 - 1)); - securec_check_c(rc, "\0", "\0"); - } else { - nRet = snprintf_s(newconf_line, MAX_PARAM_LEN*2, MAX_PARAM_LEN*2 - 1, "#%s", optconf_line); - securec_check_ss_c(nRet, "\0", "\0"); - } + write_stderr(_("ERROR: %s parameters value is expected\n"), config_param[i]); + return FAILURE; } updateoradd = UPDATE_PARAMETER; } else {