Fix dolphin plugin oidhash bug

This commit is contained in:
totaj
2023-11-15 14:52:07 +08:00
parent 3172134f4c
commit 7fc5656ccf

View File

@ -119,10 +119,12 @@ static void InitHashTable(int size)
static HTAB* get_name_hash_table_type() static HTAB* get_name_hash_table_type()
{ {
#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) #if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS))
if (a_nameHash != NULL && DB_IS_CMPT(A_FORMAT) && CUR_THR_IS_WORKER()) { if (CUR_THR_IS_WORKER() && IsNormalProcessingMode()) {
return a_nameHash; if (a_nameHash != NULL && DB_IS_CMPT(A_FORMAT)) {
} else if (b_nameHash != NULL && DB_IS_CMPT(B_FORMAT) && CUR_THR_IS_WORKER()) { return a_nameHash;
return b_nameHash; } else if (b_nameHash != NULL && DB_IS_CMPT(B_FORMAT)) {
return b_nameHash;
}
} }
#endif #endif
return nameHash; return nameHash;
@ -131,10 +133,12 @@ static HTAB* get_name_hash_table_type()
static HTAB* get_oid_hash_table_type() static HTAB* get_oid_hash_table_type()
{ {
#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS)) #if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS))
if (a_oidHash != NULL && DB_IS_CMPT(A_FORMAT) && CUR_THR_IS_WORKER()) { if (CUR_THR_IS_WORKER() && IsNormalProcessingMode()) {
return a_oidHash; if (a_oidHash != NULL && DB_IS_CMPT(A_FORMAT)) {
} else if (b_oidHash != NULL && DB_IS_CMPT(B_FORMAT) && CUR_THR_IS_WORKER()) { return a_oidHash;
return b_oidHash; } else if (b_oidHash != NULL && DB_IS_CMPT(B_FORMAT)) {
return b_oidHash;
}
} }
#endif #endif
return oidHash; return oidHash;