This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 845302d603c [Fix](load) Restrict the import of VARCHAR(0) data to
avoid coredump (#40940)
845302d603c is described below
commit 845302d603c3888a5c0dc1dd8130400cea2bd507
Author: Xin Liao <[email protected]>
AuthorDate: Thu Sep 19 11:47:33 2024 +0800
[Fix](load) Restrict the import of VARCHAR(0) data to avoid coredump
(#40940)
The VARCHAR(0) created has an actual length of 0, and BE didn't restrict
it, leading to a BE core dump.
#[38427](https://github.com/apache/doris/pull/38427) changed VARCHAR(0)
to have a length of 65533. This PR restricts data import when the length
is 0 to avoid a core dump.
---
be/src/vec/sink/vtablet_block_convertor.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/be/src/vec/sink/vtablet_block_convertor.cpp
b/be/src/vec/sink/vtablet_block_convertor.cpp
index feb6633511e..b5a8c0e0076 100644
--- a/be/src/vec/sink/vtablet_block_convertor.cpp
+++ b/be/src/vec/sink/vtablet_block_convertor.cpp
@@ -212,7 +212,7 @@ Status
OlapTableBlockConvertor::_validate_column(RuntimeState* state, const Type
auto string_column_checker = [&](const ColumnString* column_string) {
size_t limit = config::string_type_length_soft_limit_bytes;
// when type.len is negative, std::min will return overflow value, so
we need to check it
- if (type.len > 0) {
+ if (type.len >= 0) {
limit = std::min(config::string_type_length_soft_limit_bytes,
type.len);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]