diff --git a/mysql-test/suite/rocksdb/r/i_s_sst_props.result b/mysql-test/suite/rocksdb/r/i_s_sst_props.result index cb566209b457..5179eb5a20db 100644 --- a/mysql-test/suite/rocksdb/r/i_s_sst_props.result +++ b/mysql-test/suite/rocksdb/r/i_s_sst_props.result @@ -12,12 +12,12 @@ ROCKSDB_SST_PROPS CREATE TEMPORARY TABLE `ROCKSDB_SST_PROPS` ( `INDEX_PARTITIONS` int NOT NULL DEFAULT '0', `TOP_LEVEL_INDEX_SIZE` bigint NOT NULL DEFAULT '0', `FILTER_BLOCK_SIZE` bigint NOT NULL DEFAULT '0', - `COMPRESSION_ALGO` varchar(193) NOT NULL DEFAULT '', + `COMPRESSION_ALGO` varchar(193) DEFAULT NULL, `CREATION_TIME` bigint NOT NULL DEFAULT '0', `FILE_CREATION_TIME` bigint NOT NULL DEFAULT '0', `OLDEST_KEY_TIME` bigint NOT NULL DEFAULT '0', - `FILTER_POLICY` varchar(193) NOT NULL DEFAULT '', - `COMPRESSION_OPTIONS` varchar(193) NOT NULL DEFAULT '' + `FILTER_POLICY` varchar(193) DEFAULT NULL, + `COMPRESSION_OPTIONS` varchar(193) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8mb3 uninstall plugin rocksdb; select * from information_schema.rocksdb_sst_props; diff --git a/storage/rocksdb/rdb_i_s.cc b/storage/rocksdb/rdb_i_s.cc index fdb78ca19b1f..c0b22a7ded5c 100644 --- a/storage/rocksdb/rdb_i_s.cc +++ b/storage/rocksdb/rdb_i_s.cc @@ -1670,16 +1670,18 @@ static ST_FIELD_INFO rdb_i_s_sst_props_fields_info[] = { MYSQL_TYPE_LONGLONG, 0), ROCKSDB_FIELD_INFO("FILTER_BLOCK_SIZE", sizeof(int64_t), MYSQL_TYPE_LONGLONG, 0), - ROCKSDB_FIELD_INFO("COMPRESSION_ALGO", NAME_LEN + 1, MYSQL_TYPE_STRING, 0), + ROCKSDB_FIELD_INFO("COMPRESSION_ALGO", NAME_LEN + 1, MYSQL_TYPE_STRING, + MY_I_S_MAYBE_NULL), ROCKSDB_FIELD_INFO("CREATION_TIME", sizeof(int64_t), MYSQL_TYPE_LONGLONG, 0), ROCKSDB_FIELD_INFO("FILE_CREATION_TIME", sizeof(int64_t), MYSQL_TYPE_LONGLONG, 0), ROCKSDB_FIELD_INFO("OLDEST_KEY_TIME", sizeof(int64_t), MYSQL_TYPE_LONGLONG, 0), - ROCKSDB_FIELD_INFO("FILTER_POLICY", NAME_LEN + 1, MYSQL_TYPE_STRING, 0), + ROCKSDB_FIELD_INFO("FILTER_POLICY", NAME_LEN + 1, MYSQL_TYPE_STRING, + MY_I_S_MAYBE_NULL), ROCKSDB_FIELD_INFO("COMPRESSION_OPTIONS", NAME_LEN + 1, MYSQL_TYPE_STRING, - 0), + MY_I_S_MAYBE_NULL), ROCKSDB_FIELD_INFO_END}; static int rdb_i_s_sst_props_fill_table( @@ -1756,6 +1758,7 @@ static int rdb_i_s_sst_props_fill_table( if (props.second->compression_name.empty()) { field[RDB_SST_PROPS_FIELD::COMPRESSION_ALGO]->set_null(); } else { + field[RDB_SST_PROPS_FIELD::COMPRESSION_ALGO]->set_notnull(); field[RDB_SST_PROPS_FIELD::COMPRESSION_ALGO]->store( props.second->compression_name.c_str(), props.second->compression_name.size(), system_charset_info); @@ -1769,6 +1772,7 @@ static int rdb_i_s_sst_props_fill_table( if (props.second->filter_policy_name.empty()) { field[RDB_SST_PROPS_FIELD::FILTER_POLICY]->set_null(); } else { + field[RDB_SST_PROPS_FIELD::FILTER_POLICY]->set_notnull(); field[RDB_SST_PROPS_FIELD::FILTER_POLICY]->store( props.second->filter_policy_name.c_str(), props.second->filter_policy_name.size(), system_charset_info); @@ -1776,6 +1780,7 @@ static int rdb_i_s_sst_props_fill_table( if (props.second->compression_options.empty()) { field[RDB_SST_PROPS_FIELD::COMPRESSION_OPTIONS]->set_null(); } else { + field[RDB_SST_PROPS_FIELD::COMPRESSION_OPTIONS]->set_notnull(); field[RDB_SST_PROPS_FIELD::COMPRESSION_OPTIONS]->store( props.second->compression_options.c_str(), props.second->compression_options.size(), system_charset_info);