diff --git a/proto/meta.interface.proto b/proto/meta.interface.proto index 51685611..2375ee16 100755 --- a/proto/meta.interface.proto +++ b/proto/meta.interface.proto @@ -362,8 +362,8 @@ message UserPrivilege { optional bool use_read_index = 15; // 读是否走folloewr read use read idx optional bool enable_plan_cache = 16; // 是否缓存执行计划 optional RangePartitionType request_range_partition_type = 17; // 访问的Range分区类型 - optional uint32 acl = 18; //权限控制列表,bitmap - optional bool if_exist = 19; + optional uint32 acl = 20; //权限控制列表,bitmap + optional bool if_exist = 21; }; //集群信息 diff --git a/proto/optype.proto b/proto/optype.proto index 896e3ff4..8dc121d8 100755 --- a/proto/optype.proto +++ b/proto/optype.proto @@ -145,4 +145,7 @@ enum OpType { OP_SPECIFY_SPLIT_KEYS = 199; // 指定RangePartition分区的预分裂Key OP_CONVERT_PARTITION = 200; OP_MODIFY_USER = 201; //改user + OP_CREATE_VIEW = 202; // 新建视图 + OP_DROP_VIEW = 203; // 删除视图 + OP_DROP_INVALID_PRIVILEGE = 204; // 删除不存在的数据库/表的权限 }; diff --git a/proto/store.interface.proto b/proto/store.interface.proto index 64241fba..4364dae7 100755 --- a/proto/store.interface.proto +++ b/proto/store.interface.proto @@ -160,7 +160,7 @@ message StoreReq { optional uint64 sql_sign = 28; // sql 签名 repeated RegionInfo multi_new_region_infos = 29; optional ExtraReq extra_req = 30; // 非关键路径上的额外信息可以放在这里,避免该message过度膨胀 - optional int64 sql_exec_timeout = 31; + optional int64 sql_exec_timeout = 33; }; message RowValue { @@ -236,7 +236,7 @@ message StoreRes { repeated int64 ttl_timestamp = 24; optional ExtraRes extra_res = 25; // 非关键路径上的额外信息可以放在这里,避免该message过度膨胀 optional BinlogQueryInfo binlog_info = 26; //存放binlog信息 - optional int64 read_disk_size = 27; + optional int64 read_disk_size = 28; }; message InitRegion { required RegionInfo region_info = 1; diff --git a/src/common/schema_factory.cpp b/src/common/schema_factory.cpp index 7b7cf5a8..7100f705 100644 --- a/src/common/schema_factory.cpp +++ b/src/common/schema_factory.cpp @@ -1368,7 +1368,7 @@ void SchemaFactory::update_show_db(const DataBaseVec& db_infos) { BAIDU_SCOPED_LOCK(_update_show_db_mutex); _show_db_info.clear(); for (auto db_info : db_infos) { - DB_WARNING("update_show_db: %s.%s", db_info.namespace_name().c_str(), db_info.database().c_str()) + DB_WARNING("update_show_db: %s.%s", db_info.namespace_name().c_str(), db_info.database().c_str()); if (db_info.namespace_name() == "INTERNAL" && db_info.database() == "baikaldb") { //忽略INTERNAL.baikaldb continue; diff --git a/src/expr/internal_functions.cpp b/src/expr/internal_functions.cpp index fe6776ab..9ed3b151 100644 --- a/src/expr/internal_functions.cpp +++ b/src/expr/internal_functions.cpp @@ -2646,7 +2646,7 @@ ExprValue hex(const std::vector& input) { res.str_val = ss.str(); } else { num.cast_to(pb::STRING); - char * c = (char *)malloc(2 * num.str_val.size() + 1); + char* c = new char[2 * num.str_val.size() + 1]; int idx = 0; for (char ch : num.str_val) { sprintf(c + idx, "%02X", static_cast(ch)); @@ -2654,7 +2654,7 @@ ExprValue hex(const std::vector& input) { } c[2 * num.str_val.size()] = 0; res.str_val = c; - delete c; + delete[] c; } std::transform(res.str_val.begin(), res.str_val.end(), res.str_val.begin(), ::toupper); return res; diff --git a/src/protocol/show_helper.cpp b/src/protocol/show_helper.cpp index 31eb773b..4e427be9 100644 --- a/src/protocol/show_helper.cpp +++ b/src/protocol/show_helper.cpp @@ -4611,7 +4611,7 @@ bool ShowHelper::_show_grants(const SmartSocket& client, const std::vector subquery_signs = {8394144613061275097, 8919421716185942419}; //bm << BvarMap(std::make_pair("abc", 1)); - bm << BvarMap("abc", 1, 101, 101, 10, 1, 5, 3, 1, field_range_type, 1, parent_sign, subquery_signs); - bm << BvarMap("abc", 4, 102, 102, 20, 2, 6, 2, 1, field_range_type, 1, parent_sign, subquery_signs); - bm << BvarMap("bcd", 5, 103, 103, 30, 3, 7, 1, 1, field_range_type, 1, parent_sign, subquery_signs); + bm << BvarMap("abc", 1, 101, 101, 10, 1, 5, 3, 100, 1, field_range_type, 1, parent_sign, subquery_signs); + bm << BvarMap("abc", 4, 102, 102, 20, 2, 6, 2, 100, 1, field_range_type, 1, parent_sign, subquery_signs); + bm << BvarMap("bcd", 5, 103, 103, 30, 3, 7, 1, 100, 1, field_range_type, 1, parent_sign, subquery_signs); std::cout << bm.get_value(); }