diff --git a/src/bin/pg_ctl/pg_ctl.cpp b/src/bin/pg_ctl/pg_ctl.cpp index a6228eb41..6bc30e0fe 100644 --- a/src/bin/pg_ctl/pg_ctl.cpp +++ b/src/bin/pg_ctl/pg_ctl.cpp @@ -3900,6 +3900,7 @@ static void do_incremental_build(uint32 term) } if (status == BUILD_SUCCESS) { /* pg_ctl start -M standby */ + FREE_AND_RESET(pgha_opt); pgha_opt = (char*)pg_malloc(sizeof(standbymode_str)); tnRet = snprintf_s(pgha_opt, sizeof(standbymode_str), sizeof(standbymode_str) - 1, "%s", standbymode_str); securec_check_ss_c(tnRet, "\0", "\0"); @@ -4013,6 +4014,7 @@ static void do_actual_build(uint32 term) */ if (conn_str == NULL) { /* pg_ctl start -M standby */ + FREE_AND_RESET(pgha_opt); pgha_opt = (char*)pg_malloc(sizeof(standbymode_str)); tnRet = snprintf_s(pgha_opt, sizeof(standbymode_str), sizeof(standbymode_str) - 1, "%s", standbymode_str); securec_check_ss_c(tnRet, "\0", "\0"); diff --git a/src/gausskernel/optimizer/commands/analyze.cpp b/src/gausskernel/optimizer/commands/analyze.cpp index ab44888ed..f0f36e70f 100755 --- a/src/gausskernel/optimizer/commands/analyze.cpp +++ b/src/gausskernel/optimizer/commands/analyze.cpp @@ -926,7 +926,7 @@ HeapTuple* get_total_rows(Relation onerel, VacuumStmt* vacstmt, BlockNumber relp *numrows = (tableFdwRoutine->AcquireSampleRows)( onerel, elevel, rows, target_rows, totalrows, totaldeadrows, 0, estimate_table_rownum); } - totaldeadrows = 0; /* set totaldeadrows to zero. It is no means to foreign table. */ + *totaldeadrows = 0; /* set totaldeadrows to zero. It is no means to foreign table. */ } } else { if (RelationIsColStore(onerel)) { diff --git a/src/gausskernel/optimizer/commands/tablecmds.cpp b/src/gausskernel/optimizer/commands/tablecmds.cpp index 006ab17d5..7271c6373 100644 --- a/src/gausskernel/optimizer/commands/tablecmds.cpp +++ b/src/gausskernel/optimizer/commands/tablecmds.cpp @@ -15922,6 +15922,8 @@ static bool CheckRangePartitionKeyType(Oid typoid) break; case TEXTOID: + /* fall through */ + case CLOBOID: result = true; break;