!2547 修复当配置文件里配置dolphin.b_compatibility_mode为on时无法使用B兼容性数据库的问题
Merge pull request !2547 from chenxiaobin/initDolphinHook
This commit is contained in:
@ -115,9 +115,9 @@ static void InitHashTable(int size)
|
||||
static HTAB* get_name_hash_table_type()
|
||||
{
|
||||
#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS))
|
||||
if (a_nameHash != NULL && u_sess->attr.attr_sql.whale) {
|
||||
if (a_nameHash != NULL && DB_IS_CMPT(A_FORMAT)) {
|
||||
return a_nameHash;
|
||||
} else if (b_nameHash != NULL && u_sess->attr.attr_sql.dolphin) {
|
||||
} else if (b_nameHash != NULL && DB_IS_CMPT(B_FORMAT)) {
|
||||
return b_nameHash;
|
||||
}
|
||||
#endif
|
||||
@ -127,9 +127,9 @@ static HTAB* get_name_hash_table_type()
|
||||
static HTAB* get_oid_hash_table_type()
|
||||
{
|
||||
#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS))
|
||||
if (a_oidHash != NULL && u_sess->attr.attr_sql.whale) {
|
||||
if (a_oidHash != NULL && DB_IS_CMPT(A_FORMAT)) {
|
||||
return a_oidHash;
|
||||
} else if (b_oidHash != NULL && u_sess->attr.attr_sql.dolphin) {
|
||||
} else if (b_oidHash != NULL && DB_IS_CMPT(B_FORMAT)) {
|
||||
return b_oidHash;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1428,13 +1428,6 @@ void CreateExtension(CreateExtensionStmt* stmt)
|
||||
|
||||
u_sess->exec_cxt.extension_is_valid = true;
|
||||
|
||||
#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS))
|
||||
if (pg_strcasecmp(stmt->extname, "dolphin") == 0) {
|
||||
u_sess->attr.attr_sql.dolphin = true;
|
||||
} else if (pg_strcasecmp(stmt->extname, "whale") == 0) {
|
||||
u_sess->attr.attr_sql.whale = true;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Insert new tuple into pg_extension, and create dependency entries.
|
||||
*/
|
||||
@ -1468,7 +1461,10 @@ void CreateExtension(CreateExtensionStmt* stmt)
|
||||
u_sess->exec_cxt.extension_is_valid = false;
|
||||
#if (!defined(ENABLE_MULTIPLE_NODES)) && (!defined(ENABLE_PRIVATEGAUSS))
|
||||
if (pg_strcasecmp(stmt->extname, "dolphin") == 0) {
|
||||
u_sess->attr.attr_sql.dolphin = true;
|
||||
InitBSqlPluginHookIfNeeded();
|
||||
} else if (pg_strcasecmp(stmt->extname, "whale") == 0) {
|
||||
u_sess->attr.attr_sql.whale = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1335,7 +1335,6 @@ typedef struct knl_instance_context {
|
||||
|
||||
#ifndef ENABLE_MULTIPLE_NODES
|
||||
void *raw_parser_hook[DB_CMPT_MAX];
|
||||
void *plsql_parser_hook[DB_CMPT_MAX];
|
||||
char *llvmIrFilePath[DB_CMPT_MAX];
|
||||
pthread_mutex_t loadPluginLock[DB_CMPT_MAX];
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user