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,11 +119,13 @@ 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()) {
if (a_nameHash != NULL && DB_IS_CMPT(A_FORMAT)) {
return a_nameHash; return a_nameHash;
} else if (b_nameHash != NULL && DB_IS_CMPT(B_FORMAT) && CUR_THR_IS_WORKER()) { } else if (b_nameHash != NULL && DB_IS_CMPT(B_FORMAT)) {
return b_nameHash; return b_nameHash;
} }
}
#endif #endif
return nameHash; return nameHash;
} }
@ -131,11 +133,13 @@ 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()) {
if (a_oidHash != NULL && DB_IS_CMPT(A_FORMAT)) {
return a_oidHash; return a_oidHash;
} else if (b_oidHash != NULL && DB_IS_CMPT(B_FORMAT) && CUR_THR_IS_WORKER()) { } else if (b_oidHash != NULL && DB_IS_CMPT(B_FORMAT)) {
return b_oidHash; return b_oidHash;
} }
}
#endif #endif
return oidHash; return oidHash;
} }