[scn] fix failure of mittest after refresh feature scn

This commit is contained in:
obdev
2022-11-28 01:46:42 +00:00
committed by ob-robot
parent 49a02f3304
commit 54b64a7263
1898 changed files with 255804 additions and 280809 deletions

View File

@ -1125,6 +1125,15 @@ int ObOptStatSqlService::fill_table_stat(common::sqlclient::ObMySQLResult &resul
EXTRACT_INT_FIELD_TO_CLASS_MYSQL(result, partition_id, stat, int64_t);
EXTRACT_INT_FIELD_TO_CLASS_MYSQL(result, object_type, stat, int64_t);
EXTRACT_INT_FIELD_TO_CLASS_MYSQL(result, row_count, stat, int64_t);
// if (GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_3200) {
// EXTRACT_INT_FIELD_TO_CLASS_MYSQL(result, avg_row_size, stat, int64_t);
// } else {
// EXTRACT_DOUBLE_FIELD_TO_CLASS_MYSQL(result, avg_row_size, stat, double);
// }
// why not use GET_MIN_CLUSTER_VERSION to check result is int64_t or double?
// Because there has a corner case. When execute inner sql, min cluster verion is 3100.
// inner sql will select __all_table_stat and avg_row_size is int64_t. When fill table
// min cluster version is 3200, but avg_row_size result is int64_t, not double.
if (OB_SUCC(ret)) {
if (OB_FAIL(result.get_type("avg_row_size", obj_type))) {
LOG_WARN("failed to get type", K(ret));
@ -1477,9 +1486,6 @@ int ObOptStatSqlService::get_compressed_llc_bitmap(ObIAllocator &allocator,
comp_buf = const_cast<char*>(bitmap_buf);
comp_size = bitmap_size;
}
if (compressor != nullptr) {
compressor->reset_mem();
}
}
return ret;
}
@ -1517,8 +1523,6 @@ int ObOptStatSqlService::get_decompressed_llc_bitmap(ObIAllocator &allocator,
LOG_WARN("decompress bitmap buffer failed.",
KP(comp_buf), K(comp_size), KP(bitmap_buf),
K(max_bitmap_size), K(bitmap_size), K(ret));
} else {
compressor->reset_mem();
}
return ret;
}