Repair some ps bugs 1
This commit is contained in:
@ -1106,7 +1106,8 @@ bool ObMPPacketSender::has_pl()
|
||||
{
|
||||
bool has_pl = false;
|
||||
const obmysql::ObMySQLRawPacket &pkt = reinterpret_cast<const obmysql::ObMySQLRawPacket&>(req_->get_packet());
|
||||
if (obmysql::COM_STMT_EXECUTE == pkt.get_cmd()
|
||||
if (obmysql::COM_STMT_PREPARE == pkt.get_cmd()
|
||||
|| obmysql::COM_STMT_EXECUTE == pkt.get_cmd()
|
||||
|| obmysql::COM_QUERY == pkt.get_cmd()
|
||||
|| obmysql::COM_STMT_PREXECUTE == pkt.get_cmd()
|
||||
|| obmysql::COM_STMT_FETCH == pkt.get_cmd()) {
|
||||
|
||||
@ -214,6 +214,7 @@ int ObMPStmtPrepare::process()
|
||||
} else if (FALSE_IT(session.post_sync_session_info())) {
|
||||
} else if (OB_UNLIKELY(packet_len > session.get_max_packet_size())) {
|
||||
ret = OB_ERR_NET_PACKET_TOO_LARGE;
|
||||
need_disconnect = false;
|
||||
LOG_WARN("packet too large than allowd for the session", K_(sql), K(ret));
|
||||
} else if (OB_FAIL(sql::ObFLTUtils::init_flt_info(pkt.get_extra_info(), session,
|
||||
conn->proxy_cap_flags_.is_full_link_trace_support()))) {
|
||||
|
||||
@ -675,9 +675,13 @@ int ObSqlParameterization::transform_tree(TransformTreeCtx &ctx,
|
||||
}
|
||||
|
||||
// sql with charset need not ps parameterize
|
||||
if (OB_SUCC(ret) && T_QUESTIONMARK == ctx.tree_->type_ && OB_NOT_NULL(ctx.tree_->children_)
|
||||
&& OB_NOT_NULL(ctx.tree_->children_[0]) && ctx.tree_->children_[0]->type_ == T_CHARSET) {
|
||||
ctx.sql_info_->ps_need_parameterized_ = false;
|
||||
if (OB_SUCC(ret)) {
|
||||
if (T_QUESTIONMARK == ctx.tree_->type_ && OB_NOT_NULL(ctx.tree_->children_)
|
||||
&& OB_NOT_NULL(ctx.tree_->children_[0]) && ctx.tree_->children_[0]->type_ == T_CHARSET) {
|
||||
ctx.sql_info_->ps_need_parameterized_ = false;
|
||||
} else if (T_INTO_OUTFILE == ctx.tree_->type_) {
|
||||
ctx.sql_info_->ps_need_parameterized_ = false;
|
||||
}
|
||||
}
|
||||
|
||||
//判断insert中values()在tree中的哪一层,当某结点value_father_level_处于VALUE_VECTOR_LEVEL时,
|
||||
@ -1822,6 +1826,10 @@ int ObSqlParameterization::mark_tree(ParseNode *tree ,SqlInfo &sql_info)
|
||||
}
|
||||
} else if ((0 == func_name.case_compare("concat")) && 1 == node[0]->reserved_) {
|
||||
sql_info.ps_need_parameterized_ = false;
|
||||
} else if ((0 == func_name.case_compare("json_equal"))) {
|
||||
sql_info.ps_need_parameterized_ = false;
|
||||
} else if ((0 == func_name.case_compare("json_extract"))) {
|
||||
sql_info.ps_need_parameterized_ = false;
|
||||
}
|
||||
}
|
||||
} else if (T_OP_LIKE == tree->type_) {
|
||||
|
||||
Reference in New Issue
Block a user