fix max length of lob types unexpected in aggregate_max_length_for_string_result

This commit is contained in:
wanghangQ
2023-11-07 04:44:10 +00:00
committed by ob-robot
parent ab7decced9
commit ccef158aba
2 changed files with 10 additions and 6 deletions

View File

@ -1716,7 +1716,15 @@ void ObResultSet::replace_lob_type(const ObSQLSessionInfo &session,
}
}
LOG_TRACE("init field", K(is_use_lob_locator), K(field), K(mfield.type_));
} else {
} else { // mysql mode
// issue: 52728955, 52735855, 52731784, 52734963, 52729976
// compat mysql .net driver 5.7, longblob, json, gis length is max u32
if (mfield.type_ == obmysql::EMySQLFieldType::MYSQL_TYPE_LONG_BLOB
|| mfield.type_ == obmysql::EMySQLFieldType::MYSQL_TYPE_JSON
|| mfield.type_ == obmysql::EMySQLFieldType::MYSQL_TYPE_GEOMETRY) {
mfield.length_ = UINT32_MAX;
}
if (mfield.type_ == obmysql::EMySQLFieldType::MYSQL_TYPE_TINY_BLOB ||
mfield.type_ == obmysql::EMySQLFieldType::MYSQL_TYPE_MEDIUM_BLOB ||
mfield.type_ == obmysql::EMySQLFieldType::MYSQL_TYPE_LONG_BLOB) {