[CP] add enable_dblink cfg
This commit is contained in:
@ -39,6 +39,11 @@ bool __attribute__((weak)) get_dblink_reuse_connection_cfg()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool __attribute__((weak)) get_enable_dblink_cfg()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
namespace common
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include "lib/ob_errno.h"
|
||||
|
||||
extern bool get_dblink_reuse_connection_cfg();
|
||||
extern bool get_enable_dblink_cfg();
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
|
||||
@ -441,7 +441,10 @@ int ObDbLinkProxy::create_dblink_pool(const dblink_param_ctx ¶m_ctx, const O
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObISQLConnectionPool *dblink_pool = NULL;
|
||||
if (!is_inited()) {
|
||||
if (!get_enable_dblink_cfg()) {
|
||||
ret = OB_OP_NOT_ALLOW;
|
||||
LOG_WARN("dblink is disabled", K(ret));
|
||||
} else if (!is_inited()) {
|
||||
ret = OB_NOT_INIT;
|
||||
LOG_WARN("mysql proxy not inited");
|
||||
} else if (OB_FAIL(switch_dblink_conn_pool(param_ctx.link_type_, dblink_pool))) {
|
||||
|
||||
Reference in New Issue
Block a user