[cp]: fix 4 bugs for NO_BACKSLASH_ESCAPES mode.

This commit is contained in:
Monk-Liu
2021-11-30 11:13:39 +08:00
committed by LINxiansheng
parent e28151b107
commit db82de6a5b
10 changed files with 70 additions and 13 deletions

View File

@ -326,7 +326,13 @@ public:
}
const ObObjPrintParams get_obj_print_params()
{
return CREATE_OBJ_PRINT_PARAM(ctx_.get_my_session());
ObObjPrintParams print_params = CREATE_OBJ_PRINT_PARAM(ctx_.get_my_session());
print_params.need_cast_expr_ = true;
// bugfix:https://work.aone.alibaba-inc.com/issue/36658497
// in NO_BACKSLASH_ESCAPES, obj_print_sql<ObVarcharType> won't escape.
// We use skip_escape_ to indicate this case. It will finally be passed to ObHexEscapeSqlStr.
GET_SQL_MODE_BIT(IS_NO_BACKSLASH_ESCAPES, ctx_.get_my_session()->get_sql_mode(), print_params.skip_escape_);
return print_params;
}
int init_foreign_key_operation();
int check_rowkey_is_null(const ObExprPtrIArray& row, int64_t rowkey_cnt, bool& is_null) const;