prohibit create table with zlib compressor and alter table set zlib compressor
This commit is contained in:
@ -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_))) {
|
||||
|
@ -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_);
|
||||
|
Reference in New Issue
Block a user