[FEAT MERGE]

This commit is contained in:
obdev
2022-11-21 07:38:55 +00:00
committed by wangzelin.wzl
parent 4cf8473874
commit e082b0bc9b
5 changed files with 51 additions and 3 deletions

View File

@ -69,6 +69,7 @@ public:
virtual int execute(sql::ObSql &engine, sql::ObSqlCtx &ctx, sql::ObResultSet &res)
{
int ret = OB_SUCCESS;
common::ObSqlInfoGuard si_guard(sql_);
// Deep copy sql, because sql may be destroyed before result iteration.
const int64_t alloc_size = sizeof(ObString) + sql_.length() + 1; // 1 for C terminate char
void *mem = res.get_mem_pool().alloc(alloc_size);
@ -1858,6 +1859,7 @@ int ObInnerSQLConnection::execute_write_inner(const uint64_t tenant_id, const Ob
}
}
if (OB_SUCC(ret)) {
get_session().store_query_string(sql);
ObInnerSQLTransmitArg arg (MYADDR, get_resource_svr(), tenant_id, get_resource_conn_id(),
sql, ObInnerSQLTransmitArg::OPERATION_TYPE_EXECUTE_WRITE,
lib::Worker::CompatMode::ORACLE == get_compat_mode(), GCONF.cluster_id,
@ -2043,6 +2045,7 @@ int ObInnerSQLConnection::execute_read_inner(const int64_t cluster_id,
}
}
if (OB_SUCC(ret)) {
get_session().store_query_string(sql);
ObInnerSQLTransmitArg arg (MYADDR, get_resource_svr(), tenant_id, get_resource_conn_id(),
sql, ObInnerSQLTransmitArg::OPERATION_TYPE_EXECUTE_READ,
lib::Worker::CompatMode::ORACLE == get_compat_mode(), GCONF.cluster_id,