Fix load plugin bug.
This commit is contained in:
@ -7474,13 +7474,22 @@ void LoadSqlPlugin()
|
|||||||
/* recheck and load dolphin within lock */
|
/* recheck and load dolphin within lock */
|
||||||
pthread_mutex_lock(&g_instance.loadPluginLock[DB_CMPT_B]);
|
pthread_mutex_lock(&g_instance.loadPluginLock[DB_CMPT_B]);
|
||||||
|
|
||||||
start_xact_command();
|
PG_TRY();
|
||||||
u_sess->attr.attr_sql.dolphin = CheckIfExtensionExists("dolphin");
|
{
|
||||||
finish_xact_command();
|
start_xact_command();
|
||||||
|
u_sess->attr.attr_sql.dolphin = CheckIfExtensionExists("dolphin");
|
||||||
|
finish_xact_command();
|
||||||
|
|
||||||
if (!u_sess->attr.attr_sql.dolphin) {
|
if (!u_sess->attr.attr_sql.dolphin) {
|
||||||
LoadDolphinIfNeeded();
|
LoadDolphinIfNeeded();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
PG_CATCH();
|
||||||
|
{
|
||||||
|
pthread_mutex_unlock(&g_instance.loadPluginLock[DB_CMPT_B]);
|
||||||
|
PG_RE_THROW();
|
||||||
|
}
|
||||||
|
PG_END_TRY();
|
||||||
pthread_mutex_unlock(&g_instance.loadPluginLock[DB_CMPT_B]);
|
pthread_mutex_unlock(&g_instance.loadPluginLock[DB_CMPT_B]);
|
||||||
} else if (u_sess->attr.attr_sql.dolphin) {
|
} else if (u_sess->attr.attr_sql.dolphin) {
|
||||||
InitBSqlPluginHookIfNeeded();
|
InitBSqlPluginHookIfNeeded();
|
||||||
|
Reference in New Issue
Block a user