prohibit create table with zlib compressor and alter table set zlib compressor

This commit is contained in:
obdev
2023-08-03 16:12:30 +00:00
committed by ob-robot
parent 009b2d062d
commit ebf9698855
2 changed files with 12 additions and 0 deletions

View File

@ -387,6 +387,10 @@ int ObAlterTableResolver::set_table_options()
//deep copy
if (OB_FAIL(ret)) {
//do nothing
} else if (compress_method_ == all_compressor_name[ZLIB_COMPRESSOR]) {
ret = OB_NOT_SUPPORTED;
SQL_RESV_LOG(WARN, "Not allowed to use zlib compressor!", K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "zlib compressor");
} else if (OB_FAIL(alter_table_schema.set_compress_func_name(compress_method_))) {
SQL_RESV_LOG(WARN, "Write compress_method_ to alter_table_schema failed!", K(ret));
} else if (OB_FAIL(alter_table_schema.set_comment(comment_))) {

View File

@ -2385,6 +2385,14 @@ int ObCreateTableResolver::set_table_option_to_schema(ObTableSchema &table_schem
}
}
if (OB_SUCC(ret)) {
if (compress_method_ == all_compressor_name[ZLIB_COMPRESSOR]) {
ret = OB_NOT_SUPPORTED;
SQL_RESV_LOG(WARN, "Not allowed to use zlib compressor!", K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "zlib compressor");
}
}
if (OB_SUCC(ret)) {
table_schema.set_row_store_type(row_store_type_);
table_schema.set_store_format(store_format_);