[FEAT MERGE]charset latin1

This commit is contained in:
akaError
2023-01-28 15:43:48 +08:00
committed by ob-robot
parent 2663894581
commit af2506b14c
42 changed files with 1215 additions and 392 deletions

View File

@ -22,6 +22,8 @@
#include "sql/resolver/expr/ob_raw_expr_util.h"
#include "lib/oblog/ob_log_module.h"
#include "ob_expr_json_func_helper.h"
#include "lib/charset/ob_charset.h"
// from sql_parser_base.h
#define DEFAULT_STR_LENGTH -1
@ -865,8 +867,7 @@ int ObExprJsonValue::cast_to_string(common::ObIAllocator *allocator,
&& (ObCharset::charset_type_by_coll(in_cs_type) !=
ObCharset::charset_type_by_coll(dst_cs_type))) {
char *buf = NULL;
const int64_t factor = 2;
int64_t buf_len = temp_str_val.length() * factor;
int64_t buf_len = temp_str_val.length() * ObCharset::CharConvertFactorNum;
uint32_t result_len = 0;
buf = reinterpret_cast<char*>(allocator->alloc(buf_len));
if (OB_ISNULL(buf)) {