[to #52107651]mysql proc only return ok in c driver
This commit is contained in:
@ -154,6 +154,8 @@ int ObSyncCmdDriver::response_result(ObMySQLResultSet &result)
|
||||
if (!result.is_pl_stmt(result.get_stmt_type())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_ERROR("Not SELECT, should not have any row!!!", K(ret));
|
||||
} else if (!result.is_ps_protocol() && is_mysql_mode() && session_.client_non_standard()) {
|
||||
// do nothing
|
||||
} else if (OB_FAIL(response_query_result(result))) {
|
||||
LOG_WARN("response query result fail", K(ret));
|
||||
free_output_row(result);
|
||||
@ -184,7 +186,8 @@ int ObSyncCmdDriver::response_result(ObMySQLResultSet &result)
|
||||
LOG_WARN("close result set fail", K(ret));
|
||||
} else if (!result.is_with_rows()
|
||||
|| (sender_.need_send_extra_ok_packet() && !result.has_more_result())
|
||||
|| is_prexecute_) {
|
||||
|| is_prexecute_
|
||||
|| (!result.is_ps_protocol() && is_mysql_mode() && session_.client_non_standard())) {
|
||||
process_ok = true;
|
||||
ObOKPParam ok_param;
|
||||
ok_param.message_ = const_cast<char*>(result.get_message());
|
||||
|
||||
@ -1940,6 +1940,7 @@ int ObMPConnect::verify_identify(ObSMConnection &conn, ObSQLSessionInfo &session
|
||||
session.set_tenant(tenant_name_, tenant_id);
|
||||
session.set_proxy_cap_flags(conn.proxy_cap_flags_);
|
||||
session.set_login_tenant_id(tenant_id);
|
||||
session.set_client_non_standard(common::OB_CLIENT_NON_STANDARD == conn.client_type_ ? true : false);
|
||||
// Check tenant after set tenant session is necessary!
|
||||
// Because if another client is deleting this tenant while the
|
||||
// session doesn't has been contructed completely, omt
|
||||
|
||||
@ -199,7 +199,8 @@ ObSQLSessionInfo::ObSQLSessionInfo(const uint64_t tenant_id) :
|
||||
vport_(0),
|
||||
in_bytes_(0),
|
||||
out_bytes_(0),
|
||||
current_dblink_sequence_id_(0)
|
||||
current_dblink_sequence_id_(0),
|
||||
client_non_standard_(false)
|
||||
{
|
||||
MEMSET(tenant_buff_, 0, sizeof(share::ObTenantSpaceFetcher));
|
||||
MEMSET(vip_buf_, 0, sizeof(vip_buf_));
|
||||
@ -369,6 +370,7 @@ void ObSQLSessionInfo::reset(bool skip_sys_var)
|
||||
dblink_context_.reset(); // need reset before ObBasicSessionInfo::reset(skip_sys_var);
|
||||
ObBasicSessionInfo::reset(skip_sys_var);
|
||||
txn_free_route_ctx_.reset();
|
||||
client_non_standard_ = false;
|
||||
}
|
||||
gtt_session_scope_unique_id_ = 0;
|
||||
gtt_trans_scope_unique_id_ = 0;
|
||||
|
||||
@ -1125,6 +1125,8 @@ public:
|
||||
ObDBlinkSequenceIdMap &get_dblink_sequence_id_map() { return dblink_sequence_id_map_; }
|
||||
void set_current_dblink_sequence_id(int64_t id) { current_dblink_sequence_id_ = id; }
|
||||
int64_t get_current_dblink_sequence_id() const { return current_dblink_sequence_id_; }
|
||||
void set_client_non_standard(bool client_non_standard) { client_non_standard_ = client_non_standard; }
|
||||
bool client_non_standard() { return client_non_standard_; }
|
||||
int get_mem_ctx_alloc(common::ObIAllocator *&alloc);
|
||||
int update_sess_sync_info(const SessionSyncInfoType sess_sync_info_type,
|
||||
const char *buf, const int64_t length, int64_t &pos);
|
||||
@ -1507,6 +1509,7 @@ private:
|
||||
int64_t out_bytes_;
|
||||
int64_t current_dblink_sequence_id_;
|
||||
common::ObSEArray<ObSequenceSchema*, 2> dblink_sequence_schemas_;
|
||||
bool client_non_standard_;
|
||||
};
|
||||
|
||||
inline bool ObSQLSessionInfo::is_terminate(int &ret) const
|
||||
|
||||
Reference in New Issue
Block a user