[Json] json patch from 3.2.2 branch since 2021.12
This commit is contained in:
		| @ -147,16 +147,8 @@ int ObExprJsonArrayInsert::calc_resultN(ObObj &result, const ObObj *objs, int64_ | ||||
|     } else if (OB_FAIL(j_base->get_raw_binary(raw_bin, allocator))) { | ||||
|       LOG_WARN("fail to get json raw binary", K(ret)); | ||||
|     } else { | ||||
|       uint64_t length = raw_bin.length(); | ||||
|       char *buf = reinterpret_cast<char *>(allocator->alloc(length)); | ||||
|       if (OB_ISNULL(buf)) { | ||||
|         ret = OB_ALLOCATE_MEMORY_FAILED; | ||||
|         LOG_WARN("fail to alloc memory for json array insert result", K(ret), K(length)); | ||||
|       } else { | ||||
|         MEMCPY(buf, raw_bin.ptr(), length); | ||||
|         result.set_collation_type(CS_TYPE_UTF8MB4_BIN); | ||||
|         result.set_string(ObJsonType, buf, length); | ||||
|       } | ||||
|       result.set_collation_type(CS_TYPE_UTF8MB4_BIN); | ||||
|       result.set_string(ObJsonType, raw_bin.ptr(), raw_bin.length()); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 xj0
					xj0