From 17fabd983aa98dc4ff9784a235c33a93124226ac Mon Sep 17 00:00:00 2001 From: caifeizhi Date: Mon, 21 Mar 2022 14:35:06 +0800 Subject: [PATCH] modify default ob_create_table_strict_mode to 0 --- .../system_variable/gen_ob_sys_variables.py | 40 ++++++++----------- .../system_variable/ob_sys_var_class_type.h | 2 +- .../ob_system_variable_alias.h | 7 ++-- .../ob_system_variable_factory.cpp | 6 +-- .../ob_system_variable_factory.h | 7 ++-- .../ob_system_variable_init.cpp | 10 ++--- .../system_variable/ob_system_variable_init.h | 2 +- .../ob_system_variable_init.json | 2 +- tools/upgrade/opts.py | 2 +- tools/upgrade/sys_vars_dict.py | 4 +- tools/upgrade/upgrade_checker.py | 2 +- .../upgrade/upgrade_cluster_health_checker.py | 2 +- tools/upgrade/upgrade_post.py | 4 +- tools/upgrade/upgrade_pre.py | 4 +- tools/upgrade/upgrade_rolling_post.py | 2 +- tools/upgrade/upgrade_rolling_pre.py | 2 +- 16 files changed, 42 insertions(+), 56 deletions(-) diff --git a/src/share/system_variable/gen_ob_sys_variables.py b/src/share/system_variable/gen_ob_sys_variables.py index 6cd518354..73ea8c3cb 100755 --- a/src/share/system_variable/gen_ob_sys_variables.py +++ b/src/share/system_variable/gen_ob_sys_variables.py @@ -14,9 +14,8 @@ BOOL = "bool" NUMERIC = "numeric" ENUM = "enum" -# `ob_max_sys_var_id`表示当前版本预分配的可以使用的system var id的最大值, -# 系统会根据ob_max_sys_var_id的值预分配sys var id -> sys var的映射数组,不能将其随意调大, -# 如果需要分配的系统变量的sys var id必须大于`ob_max_sys_var_id`,需要将`ob_max_sys_var_id`调大 +# `ob_max_sys_var_id` indicates the max value of available pre allocated system vairable +# DO NOT change this value ob_max_sys_var_id = 20000 flag_dict = {} @@ -61,7 +60,7 @@ type_dict["varchar"] = "ObVarcharType" type_dict["bool"] = "ObIntType" # FIXME: tinyint? type_dict["enum"] = "ObIntType" -# 这个映射是建立在ObObjType的值不改变的前提的,如果ObObjType的值改变,这里也要跟着改 +# this mapping according ObObjType type_value_dict = {} type_value_dict["tinyint"] = 1 type_value_dict["int"] = 5 @@ -74,8 +73,7 @@ type_value_dict["enum"] = 5 required_attrs = ["publish_version", "info_cn", "background_cn", "ref_url"] ignored_attrs = ["publish_version", "info_cn", "background_cn", "ref_url"] -file_head_annotation = """ -/** +file_head_annotation = """/** * Copyright (c) 2021 OceanBase * OceanBase CE is licensed under Mulan PubL v2. * You can use this software according to the terms and conditions of the Mulan PubL v2. @@ -102,10 +100,9 @@ def make_alias_file(pdir, alias_file_name, sorted_list): alias_file =open(alias_file_name,'w') alias_file.write(file_head_annotation); alias_file.write(""" -/* 此处定义所有系统变量的名字。初始化@see ob_ddl_operation.cpp和ob_basic_session_info.cpp - * @note: 所有OB特有的非mysql的系统变量,都以ob_开头,以区别于mysql系统变量的名字空间。 - * 反之,所有不以ob_开头的系统变量都必须和mysql语义完全兼容。 */ - +/* OB specific system vaiables will start with ob_, + * all system vaiables which not start with ob_ should be compatible with mysql +*/ """) suffix_idx = alias_file_name.find(".h") file_def_str = "OCEANBASE_" + pdir.replace("/", "_").upper() + "_" + alias_file_name[0 : suffix_idx].upper() + "_" @@ -148,7 +145,7 @@ def make_head_file(pdir, head_file_name, sorted_list): head_file.write("{\n"); head_file.write("namespace share\n"); head_file.write("{\n"); - head_file.write("// ObSysVarFlag的值不可随意增删改, 有任何增删改要同时同步到sql/session/gen_ob_sys_variables.py的flag_value_dict变量中\n"); + head_file.write("// ObSysVarFlag can not modified arbitrarily, all change should be synchronized to sql/session/gen_ob_sys_variables.py flag_value_dict\n"); head_file.write("struct ObSysVarFlag\n"); head_file.write("{\n"); head_file.write(" const static int64_t NONE = 0LL;\n"); @@ -259,8 +256,8 @@ def make_cpp_file(pdir, cpp_file_name, sorted_list): cpp_file.write("static ObObj ObSysVarDefaultValues[ObSysVarFactory::ALL_SYS_VARS_COUNT];\n") cpp_file.write("static ObArenaAllocator ObSysVarAllocator(ObModIds::OB_COMMON_SYS_VAR_DEFAULT_VALUE);\n") cpp_file.write("static int64_t ObSysVarsIdToArrayIdx[ObSysVarFactory::OB_MAX_SYS_VAR_ID];\n") - cpp_file.write("// VarsInit中需要判断当前最大的SysVars对应的id,是否大于OB_MAX_SYS_VAR_ID\n") - cpp_file.write("// 如果大于OB_MAX_SYS_VAR_ID表示存在无效的SysVarsId\n") + cpp_file.write("// VarsInit should check the max id is bigger than OB_MAX_SYS_VAR_ID\n") + cpp_file.write("// the id bigger than OB_MAX_SYS_VAR_ID is invalid SysVarsId\n") cpp_file.write("static bool HasInvalidSysVar = false;\n") cpp_file.write("\n") @@ -268,9 +265,9 @@ def make_cpp_file(pdir, cpp_file_name, sorted_list): cpp_file.write(" VarsInit(){\n") var_num = 0 - cpp_file.write(" // 保存当前系统变量的最大的id\n") + cpp_file.write(" // store the max id for current system variable\n") cpp_file.write(" int64_t cur_max_var_id = 0;\n") - cpp_file.write(" // ObSysVarsIdToArrayIdx数组默认初始值为-1,-1表示无效索引\n") + cpp_file.write(" // ObSysVarsIdToArrayIdx default -1,with is invalid index\n") cpp_file.write(" memset(ObSysVarsIdToArrayIdx, -1, sizeof(ObSysVarsIdToArrayIdx));\n") for (name,attributes) in sorted_list: for required_attr in required_attrs: @@ -446,7 +443,7 @@ public: static int calc_sys_var_store_idx(ObSysVarClassType sys_var_id, int64_t &store_idx); static int calc_sys_var_store_idx_by_name(const common::ObString &sys_var_name, int64_t &store_idx); static bool is_valid_sys_var_store_idx(int64_t store_idx); - static ObSysVarClassType find_sys_var_id_by_name(const common::ObString &sys_var_name, bool is_from_sys_table = false); //二分查找 + static ObSysVarClassType find_sys_var_id_by_name(const common::ObString &sys_var_name, bool is_from_sys_table = false); // binary-search static int get_sys_var_name_by_id(ObSysVarClassType sys_var_id, common::ObString &sys_var_name); static const common::ObString get_sys_var_name_by_id(ObSysVarClassType sys_var_id); @@ -459,8 +456,7 @@ public: const static int64_t ALL_SYS_VARS_COUNT = MYSQL_SYS_VARS_COUNT + OB_SYS_VARS_COUNT; const static int16_t OB_SPECIFIC_SYS_VAR_ID_OFFSET = 10000; - // 表示当前OB能够使用的sys var id的最大值,正常情况下,不需要申请大于OB_MAX_SYS_VAR_ID的sys var id, - // 如果需要申请大于OB_MAX_SYS_VAR_ID的sys var id,需要先调整ob_max_sys_var_id的值 + // OB_MAX_SYS_VAR_ID indicate the max sys var id in current values,You should NOT use sys var id bigger than OB_MAX_SYS_VAR_ID const static int32_t OB_MAX_SYS_VAR_ID = """) wfile.write(str(ob_max_sys_var_id) + ";") wfile.write(""" @@ -696,15 +692,12 @@ ObSysVarClassType ObSysVarFactory::find_sys_var_id_by_name(const ObString &sys_v LOG_ERROR("invalid lower index", K(ret), K(sys_var_name), K(lower_idx), LITERAL_K(ObSysVarFactory::ALL_SYS_VARS_COUNT), K(lbt())); } else if (OB_UNLIKELY(ObSysVarFactory::ALL_SYS_VARS_COUNT == lower_idx)) { - // std::lower_bound返回ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME + - // ObSysVarFactory::ALL_SYS_VARS_COUNT的地址,即是找不到,而不是出错 ret = OB_SEARCH_NOT_FOUND; } else if (0 != sys_var_name.case_compare( ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME[lower_idx])) { - // 找不到 ret = OB_SEARCH_NOT_FOUND; } else { - sys_var_id = ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[lower_idx]; // 找到了 + sys_var_id = ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[lower_idx]; } if (OB_UNLIKELY(OB_SEARCH_NOT_FOUND == ret)) { if (is_from_sys_table) { @@ -730,7 +723,6 @@ int ObSysVarFactory::calc_sys_var_store_idx(ObSysVarClassType sys_var_id, int64_ ret = OB_INVALID_ARGUMENT; LOG_ERROR("invalid sys var id", K(ret), K(var_id)); } else { - // 直接利用ObSysVarsIdToArrayIdx 索引数组查询到对应的store idx real_idx = ObSysVarsToIdxMap::get_store_idx(var_id); if (real_idx < 0) { ret = OB_SYS_VARS_MAYBE_DIFF_VERSION; @@ -961,7 +953,7 @@ def gen_sys_vars_dict_script_for_upgrade(filename, list_sorted_by_id): wfile.write('#!/usr/bin/env python\n') wfile.write('# -*- coding: utf-8 -*-\n') wfile.write('\n') - wfile.write("# sys_vars_dict.py是由gen_ob_sys_variables.py根据ob_system_variable_init.json和upgrade_sys_var_base_script.py文件生成的,不可修改\n") + wfile.write("# sys_vars_dict.py is generated by gen_ob_sys_variables.py, according ob_system_variable_init.json and upgrade_sys_var_base_script.py, DO NOT edited directly\n") wfile.write('sys_var_dict = {}\n') for (name, attributes) in list_sorted_by_id: wfile.write("sys_var_dict[\"" + name + "\"] = {\"id\": " + str(attributes["id"]) + ", \"name\": \"" + attributes["name"] + "\", \"value\": \"" + attributes["value"] + "\", \"data_type\": " + str(type_value_dict[attributes["data_type"]]) + ", \"info\": \"" + attributes["info"] + "\", \"flags\": " + str(calc_flags_from_str(attributes["flags"])) + ((", \"min_val\": \"" + attributes["min_val"] + "\"") if "min_val" in attributes.keys() else "") + ((", \"max_val\": \"" + attributes["max_val"] + "\"") if "max_val" in attributes.keys() else "") + "}\n") diff --git a/src/share/system_variable/ob_sys_var_class_type.h b/src/share/system_variable/ob_sys_var_class_type.h index 09129c6ca..0b7019574 100644 --- a/src/share/system_variable/ob_sys_var_class_type.h +++ b/src/share/system_variable/ob_sys_var_class_type.h @@ -223,4 +223,4 @@ enum ObSysVarClassType } } -#endif //OCEANBASE_SHARE_SYSTEM_VARIABLE_OB_SYS_VAR_CLASS_TYPE_ +#endif //OCEANBASE_SHARE_SYSTEM_VARIABLE_OB_SYS_VAR_CLASS_TYPE_ \ No newline at end of file diff --git a/src/share/system_variable/ob_system_variable_alias.h b/src/share/system_variable/ob_system_variable_alias.h index 7cd9f49d6..dc6c9d6f6 100644 --- a/src/share/system_variable/ob_system_variable_alias.h +++ b/src/share/system_variable/ob_system_variable_alias.h @@ -11,10 +11,9 @@ */ -/* 此处定义所有系统变量的名字。初始化@see ob_ddl_operation.cpp和ob_basic_session_info.cpp - * @note: 所有OB特有的非mysql的系统变量,都以ob_开头,以区别于mysql系统变量的名字空间。 - * 反之,所有不以ob_开头的系统变量都必须和mysql语义完全兼容。 */ - +/* OB specific system vaiables will start with ob_, + * all system vaiables which not start with ob_ should be compatible with mysql +*/ #ifndef OCEANBASE_SHARE_SYSTEM_VARIABLE_OB_SYSTEM_VARIABLE_ALIAS_ #define OCEANBASE_SHARE_SYSTEM_VARIABLE_OB_SYSTEM_VARIABLE_ALIAS_ namespace oceanbase diff --git a/src/share/system_variable/ob_system_variable_factory.cpp b/src/share/system_variable/ob_system_variable_factory.cpp index f323cba60..29fca0171 100644 --- a/src/share/system_variable/ob_system_variable_factory.cpp +++ b/src/share/system_variable/ob_system_variable_factory.cpp @@ -727,15 +727,12 @@ ObSysVarClassType ObSysVarFactory::find_sys_var_id_by_name(const ObString &sys_v LOG_ERROR("invalid lower index", K(ret), K(sys_var_name), K(lower_idx), LITERAL_K(ObSysVarFactory::ALL_SYS_VARS_COUNT), K(lbt())); } else if (OB_UNLIKELY(ObSysVarFactory::ALL_SYS_VARS_COUNT == lower_idx)) { - // std::lower_bound返回ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME + - // ObSysVarFactory::ALL_SYS_VARS_COUNT的地址,即是找不到,而不是出错 ret = OB_SEARCH_NOT_FOUND; } else if (0 != sys_var_name.case_compare( ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME[lower_idx])) { - // 找不到 ret = OB_SEARCH_NOT_FOUND; } else { - sys_var_id = ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[lower_idx]; // 找到了 + sys_var_id = ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[lower_idx]; } if (OB_UNLIKELY(OB_SEARCH_NOT_FOUND == ret)) { if (is_from_sys_table) { @@ -761,7 +758,6 @@ int ObSysVarFactory::calc_sys_var_store_idx(ObSysVarClassType sys_var_id, int64_ ret = OB_INVALID_ARGUMENT; LOG_ERROR("invalid sys var id", K(ret), K(var_id)); } else { - // 直接利用ObSysVarsIdToArrayIdx 索引数组查询到对应的store idx real_idx = ObSysVarsToIdxMap::get_store_idx(var_id); if (real_idx < 0) { ret = OB_SYS_VARS_MAYBE_DIFF_VERSION; diff --git a/src/share/system_variable/ob_system_variable_factory.h b/src/share/system_variable/ob_system_variable_factory.h index 4e9367463..da2de06dc 100644 --- a/src/share/system_variable/ob_system_variable_factory.h +++ b/src/share/system_variable/ob_system_variable_factory.h @@ -1445,7 +1445,7 @@ public: static int calc_sys_var_store_idx(ObSysVarClassType sys_var_id, int64_t &store_idx); static int calc_sys_var_store_idx_by_name(const common::ObString &sys_var_name, int64_t &store_idx); static bool is_valid_sys_var_store_idx(int64_t store_idx); - static ObSysVarClassType find_sys_var_id_by_name(const common::ObString &sys_var_name, bool is_from_sys_table = false); //二分查找 + static ObSysVarClassType find_sys_var_id_by_name(const common::ObString &sys_var_name, bool is_from_sys_table = false); // binary-search static int get_sys_var_name_by_id(ObSysVarClassType sys_var_id, common::ObString &sys_var_name); static const common::ObString get_sys_var_name_by_id(ObSysVarClassType sys_var_id); @@ -1454,8 +1454,7 @@ public: const static int64_t ALL_SYS_VARS_COUNT = MYSQL_SYS_VARS_COUNT + OB_SYS_VARS_COUNT; const static int16_t OB_SPECIFIC_SYS_VAR_ID_OFFSET = 10000; - // 表示当前OB能够使用的sys var id的最大值,正常情况下,不需要申请大于OB_MAX_SYS_VAR_ID的sys var id, - // 如果需要申请大于OB_MAX_SYS_VAR_ID的sys var id,需要先调整ob_max_sys_var_id的值 + // OB_MAX_SYS_VAR_ID indicate the max sys var id in current values,You should NOT use sys var id bigger than OB_MAX_SYS_VAR_ID const static int32_t OB_MAX_SYS_VAR_ID = 20000; private: @@ -1471,4 +1470,4 @@ private: } } -#endif //OCEANBASE_SHARE_SYSTEM_VARIABLE_OB_SYSTEM_VARIABLE_FACTORY_ +#endif //OCEANBASE_SHARE_SYSTEM_VARIABLE_OB_SYSTEM_VARIABLE_FACTORY_ \ No newline at end of file diff --git a/src/share/system_variable/ob_system_variable_init.cpp b/src/share/system_variable/ob_system_variable_init.cpp index b1e1bf291..ff046efcc 100644 --- a/src/share/system_variable/ob_system_variable_init.cpp +++ b/src/share/system_variable/ob_system_variable_init.cpp @@ -26,15 +26,15 @@ static ObSysVarFromJson ObSysVars[ObSysVarFactory::ALL_SYS_VARS_COUNT]; static ObObj ObSysVarDefaultValues[ObSysVarFactory::ALL_SYS_VARS_COUNT]; static ObArenaAllocator ObSysVarAllocator(ObModIds::OB_COMMON_SYS_VAR_DEFAULT_VALUE); static int64_t ObSysVarsIdToArrayIdx[ObSysVarFactory::OB_MAX_SYS_VAR_ID]; -// VarsInit中需要判断当前最大的SysVars对应的id,是否大于OB_MAX_SYS_VAR_ID -// 如果大于OB_MAX_SYS_VAR_ID表示存在无效的SysVarsId +// VarsInit should check the max id is bigger than OB_MAX_SYS_VAR_ID +// the id bigger than OB_MAX_SYS_VAR_ID is invalid SysVarsId static bool HasInvalidSysVar = false; static struct VarsInit{ VarsInit(){ - // 保存当前系统变量的最大的id + // store the max id for current system variable int64_t cur_max_var_id = 0; - // ObSysVarsIdToArrayIdx数组默认初始值为-1,-1表示无效索引 + // ObSysVarsIdToArrayIdx default -1,with is invalid index memset(ObSysVarsIdToArrayIdx, -1, sizeof(ObSysVarsIdToArrayIdx)); ObSysVars[0].info_ = "" ; ObSysVars[0].name_ = "auto_increment_increment" ; @@ -1331,7 +1331,7 @@ static struct VarsInit{ ObSysVars[115].info_ = "If set true, create all the replicas according to the locality or the operation will fail." ; ObSysVars[115].name_ = "ob_create_table_strict_mode" ; ObSysVars[115].data_type_ = ObIntType ; - ObSysVars[115].value_ = "1" ; + ObSysVars[115].value_ = "0" ; ObSysVars[115].flags_ = ObSysVarFlag::GLOBAL_SCOPE | ObSysVarFlag::SESSION_SCOPE ; ObSysVars[115].id_ = SYS_VAR_OB_CREATE_TABLE_STRICT_MODE ; cur_max_var_id = MAX(cur_max_var_id, static_cast(SYS_VAR_OB_CREATE_TABLE_STRICT_MODE)) ; diff --git a/src/share/system_variable/ob_system_variable_init.h b/src/share/system_variable/ob_system_variable_init.h index 7838a331d..d38a1035e 100644 --- a/src/share/system_variable/ob_system_variable_init.h +++ b/src/share/system_variable/ob_system_variable_init.h @@ -19,7 +19,7 @@ namespace oceanbase { namespace share { -// ObSysVarFlag的值不可随意增删改, 有任何增删改要同时同步到sql/session/gen_ob_sys_variables.py的flag_value_dict变量中 +// ObSysVarFlag can not modified arbitrarily, all change should be synchronized to sql/session/gen_ob_sys_variables.py flag_value_dict struct ObSysVarFlag { const static int64_t NONE = 0LL; diff --git a/src/share/system_variable/ob_system_variable_init.json b/src/share/system_variable/ob_system_variable_init.json index 6aad48138..beb8b179a 100644 --- a/src/share/system_variable/ob_system_variable_init.json +++ b/src/share/system_variable/ob_system_variable_init.json @@ -1540,7 +1540,7 @@ "ob_create_table_strict_mode": { "id": 10031, "name": "ob_create_table_strict_mode", - "value": "1", + "value": "0", "data_type": "bool", "info": "If set true, create all the replicas according to the locality or the operation will fail.", "flags": "GLOBAL | SESSION", diff --git a/tools/upgrade/opts.py b/tools/upgrade/opts.py index 712d4e9c5..99786717b 100755 --- a/tools/upgrade/opts.py +++ b/tools/upgrade/opts.py @@ -27,7 +27,7 @@ sys.argv[0] + """ [OPTIONS]""" +\ '-l, --log-file=name Log file path. If log file path is not given it\'s ' + os.path.splitext(sys.argv[0])[0] + '.log\n' +\ '\n\n' +\ 'Maybe you want to run cmd like that:\n' +\ -sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u admin -p admin\n' +sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u xxx -p xxx\n' version_str = """version 1.0.0""" diff --git a/tools/upgrade/sys_vars_dict.py b/tools/upgrade/sys_vars_dict.py index cdc1bee95..42180343a 100644 --- a/tools/upgrade/sys_vars_dict.py +++ b/tools/upgrade/sys_vars_dict.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# sys_vars_dict.py是由gen_ob_sys_variables.py根据ob_system_variable_init.json和upgrade_sys_var_base_script.py文件生成的,不可修改 +# sys_vars_dict.py is generated by gen_ob_sys_variables.py, according ob_system_variable_init.json and upgrade_sys_var_base_script.py, DO NOT edited directly sys_var_dict = {} sys_var_dict["auto_increment_increment"] = {"id": 0, "name": "auto_increment_increment", "value": "1", "data_type": 10, "info": " ", "flags": 131, "min_val": "1", "max_val": "65535"} sys_var_dict["auto_increment_offset"] = {"id": 1, "name": "auto_increment_offset", "value": "1", "data_type": 10, "info": " ", "flags": 3, "min_val": "1", "max_val": "65535"} @@ -118,7 +118,7 @@ sys_var_dict["ob_stmt_parallel_degree"] = {"id": 10027, "name": "ob_stmt_paralle sys_var_dict["is_result_accurate"] = {"id": 10028, "name": "is_result_accurate", "value": "1", "data_type": 5, "info": "when query is with topk hint, is_result_accurate indicates whether the result is acuurate or not ", "flags": 130} sys_var_dict["error_on_overlap_time"] = {"id": 10029, "name": "error_on_overlap_time", "value": "0", "data_type": 5, "info": "The variable determines how OceanBase should handle an ambiguous boundary datetime value a case in which it is not clear whether the datetime is in standard or daylight saving time", "flags": 131} sys_var_dict["ob_compatibility_mode"] = {"id": 10030, "name": "ob_compatibility_mode", "value": "0", "data_type": 5, "info": "What DBMS is OceanBase compatible with? MYSQL means it behaves like MySQL while ORACLE means it behaves like Oracle.", "flags": 2183} -sys_var_dict["ob_create_table_strict_mode"] = {"id": 10031, "name": "ob_create_table_strict_mode", "value": "1", "data_type": 5, "info": "If set true, create all the replicas according to the locality or the operation will fail.", "flags": 3} +sys_var_dict["ob_create_table_strict_mode"] = {"id": 10031, "name": "ob_create_table_strict_mode", "value": "0", "data_type": 5, "info": "If set true, create all the replicas according to the locality or the operation will fail.", "flags": 3} sys_var_dict["ob_sql_work_area_percentage"] = {"id": 10032, "name": "ob_sql_work_area_percentage", "value": "5", "data_type": 5, "info": "The percentage limitation of tenant memory for SQL execution.", "flags": 1, "min_val": "0", "max_val": "100"} sys_var_dict["ob_safe_weak_read_snapshot"] = {"id": 10033, "name": "ob_safe_weak_read_snapshot", "value": "1", "data_type": 5, "info": "The safe weak read snapshot version in one server", "flags": 146, "min_val": "0", "max_val": "9223372036854775807"} sys_var_dict["ob_route_policy"] = {"id": 10034, "name": "ob_route_policy", "value": "1", "data_type": 5, "info": "the routing policy of obproxy/java client and observer internal retry, 1=READONLY_ZONE_FIRST, 2=ONLY_READONLY_ZONE, 3=UNMERGE_ZONE_FIRST, 4=UNMERGE_FOLLOWER_FIRST", "flags": 195} diff --git a/tools/upgrade/upgrade_checker.py b/tools/upgrade/upgrade_checker.py index a7a9b5f60..929f94c76 100755 --- a/tools/upgrade/upgrade_checker.py +++ b/tools/upgrade/upgrade_checker.py @@ -102,7 +102,7 @@ sys.argv[0] + """ [OPTIONS]""" +\ '-l, --log-file=name Log file path. If log file path is not given it\'s ' + os.path.splitext(sys.argv[0])[0] + '.log\n' +\ '\n\n' +\ 'Maybe you want to run cmd like that:\n' +\ -sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u admin -p admin\n' +sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u xxx -p xxx\n' version_str = """version 1.0.0""" diff --git a/tools/upgrade/upgrade_cluster_health_checker.py b/tools/upgrade/upgrade_cluster_health_checker.py index d0b362ffe..603586908 100755 --- a/tools/upgrade/upgrade_cluster_health_checker.py +++ b/tools/upgrade/upgrade_cluster_health_checker.py @@ -76,7 +76,7 @@ sys.argv[0] + """ [OPTIONS]""" +\ '-t, --timeout=name check timeout, default: 600(s).\n' + \ '\n\n' +\ 'Maybe you want to run cmd like that:\n' +\ -sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u admin -p admin\n' +sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u xxx -p xxx\n' version_str = """version 1.0.0""" diff --git a/tools/upgrade/upgrade_post.py b/tools/upgrade/upgrade_post.py index 67be6357a..442b1e541 100755 --- a/tools/upgrade/upgrade_post.py +++ b/tools/upgrade/upgrade_post.py @@ -7212,7 +7212,7 @@ ##!/usr/bin/env python ## -*- coding: utf-8 -*- # -## sys_vars_dict.py是由gen_ob_sys_variables.py根据ob_system_variable_init.json和upgrade_sys_var_base_script.py文件生成的,不可修改 +## sys_vars_dict.py is generated by gen_ob_sys_variables.py, according ob_system_variable_init.json and upgrade_sys_var_base_script.py, DO NOT edited directly #sys_var_dict = {} #sys_var_dict["auto_increment_increment"] = {"id": 0, "name": "auto_increment_increment", "value": "1", "data_type": 10, "info": " ", "flags": 131, "min_val": "1", "max_val": "65535"} #sys_var_dict["auto_increment_offset"] = {"id": 1, "name": "auto_increment_offset", "value": "1", "data_type": 10, "info": " ", "flags": 3, "min_val": "1", "max_val": "65535"} @@ -7329,7 +7329,7 @@ #sys_var_dict["is_result_accurate"] = {"id": 10028, "name": "is_result_accurate", "value": "1", "data_type": 5, "info": "when query is with topk hint, is_result_accurate indicates whether the result is acuurate or not ", "flags": 130} #sys_var_dict["error_on_overlap_time"] = {"id": 10029, "name": "error_on_overlap_time", "value": "0", "data_type": 5, "info": "The variable determines how OceanBase should handle an ambiguous boundary datetime value a case in which it is not clear whether the datetime is in standard or daylight saving time", "flags": 131} #sys_var_dict["ob_compatibility_mode"] = {"id": 10030, "name": "ob_compatibility_mode", "value": "0", "data_type": 5, "info": "What DBMS is OceanBase compatible with? MYSQL means it behaves like MySQL while ORACLE means it behaves like Oracle.", "flags": 2183} -#sys_var_dict["ob_create_table_strict_mode"] = {"id": 10031, "name": "ob_create_table_strict_mode", "value": "1", "data_type": 5, "info": "If set true, create all the replicas according to the locality or the operation will fail.", "flags": 3} +#sys_var_dict["ob_create_table_strict_mode"] = {"id": 10031, "name": "ob_create_table_strict_mode", "value": "0", "data_type": 5, "info": "If set true, create all the replicas according to the locality or the operation will fail.", "flags": 3} #sys_var_dict["ob_sql_work_area_percentage"] = {"id": 10032, "name": "ob_sql_work_area_percentage", "value": "5", "data_type": 5, "info": "The percentage limitation of tenant memory for SQL execution.", "flags": 1, "min_val": "0", "max_val": "100"} #sys_var_dict["ob_safe_weak_read_snapshot"] = {"id": 10033, "name": "ob_safe_weak_read_snapshot", "value": "1", "data_type": 5, "info": "The safe weak read snapshot version in one server", "flags": 146, "min_val": "0", "max_val": "9223372036854775807"} #sys_var_dict["ob_route_policy"] = {"id": 10034, "name": "ob_route_policy", "value": "1", "data_type": 5, "info": "the routing policy of obproxy/java client and observer internal retry, 1=READONLY_ZONE_FIRST, 2=ONLY_READONLY_ZONE, 3=UNMERGE_ZONE_FIRST, 4=UNMERGE_FOLLOWER_FIRST", "flags": 195} diff --git a/tools/upgrade/upgrade_pre.py b/tools/upgrade/upgrade_pre.py index da8a1ff10..3a208b6d5 100755 --- a/tools/upgrade/upgrade_pre.py +++ b/tools/upgrade/upgrade_pre.py @@ -7212,7 +7212,7 @@ ##!/usr/bin/env python ## -*- coding: utf-8 -*- # -## sys_vars_dict.py是由gen_ob_sys_variables.py根据ob_system_variable_init.json和upgrade_sys_var_base_script.py文件生成的,不可修改 +## sys_vars_dict.py is generated by gen_ob_sys_variables.py, according ob_system_variable_init.json and upgrade_sys_var_base_script.py, DO NOT edited directly #sys_var_dict = {} #sys_var_dict["auto_increment_increment"] = {"id": 0, "name": "auto_increment_increment", "value": "1", "data_type": 10, "info": " ", "flags": 131, "min_val": "1", "max_val": "65535"} #sys_var_dict["auto_increment_offset"] = {"id": 1, "name": "auto_increment_offset", "value": "1", "data_type": 10, "info": " ", "flags": 3, "min_val": "1", "max_val": "65535"} @@ -7329,7 +7329,7 @@ #sys_var_dict["is_result_accurate"] = {"id": 10028, "name": "is_result_accurate", "value": "1", "data_type": 5, "info": "when query is with topk hint, is_result_accurate indicates whether the result is acuurate or not ", "flags": 130} #sys_var_dict["error_on_overlap_time"] = {"id": 10029, "name": "error_on_overlap_time", "value": "0", "data_type": 5, "info": "The variable determines how OceanBase should handle an ambiguous boundary datetime value a case in which it is not clear whether the datetime is in standard or daylight saving time", "flags": 131} #sys_var_dict["ob_compatibility_mode"] = {"id": 10030, "name": "ob_compatibility_mode", "value": "0", "data_type": 5, "info": "What DBMS is OceanBase compatible with? MYSQL means it behaves like MySQL while ORACLE means it behaves like Oracle.", "flags": 2183} -#sys_var_dict["ob_create_table_strict_mode"] = {"id": 10031, "name": "ob_create_table_strict_mode", "value": "1", "data_type": 5, "info": "If set true, create all the replicas according to the locality or the operation will fail.", "flags": 3} +#sys_var_dict["ob_create_table_strict_mode"] = {"id": 10031, "name": "ob_create_table_strict_mode", "value": "0", "data_type": 5, "info": "If set true, create all the replicas according to the locality or the operation will fail.", "flags": 3} #sys_var_dict["ob_sql_work_area_percentage"] = {"id": 10032, "name": "ob_sql_work_area_percentage", "value": "5", "data_type": 5, "info": "The percentage limitation of tenant memory for SQL execution.", "flags": 1, "min_val": "0", "max_val": "100"} #sys_var_dict["ob_safe_weak_read_snapshot"] = {"id": 10033, "name": "ob_safe_weak_read_snapshot", "value": "1", "data_type": 5, "info": "The safe weak read snapshot version in one server", "flags": 146, "min_val": "0", "max_val": "9223372036854775807"} #sys_var_dict["ob_route_policy"] = {"id": 10034, "name": "ob_route_policy", "value": "1", "data_type": 5, "info": "the routing policy of obproxy/java client and observer internal retry, 1=READONLY_ZONE_FIRST, 2=ONLY_READONLY_ZONE, 3=UNMERGE_ZONE_FIRST, 4=UNMERGE_FOLLOWER_FIRST", "flags": 195} diff --git a/tools/upgrade/upgrade_rolling_post.py b/tools/upgrade/upgrade_rolling_post.py index 42cde6c4b..42ccb5a5e 100755 --- a/tools/upgrade/upgrade_rolling_post.py +++ b/tools/upgrade/upgrade_rolling_post.py @@ -74,7 +74,7 @@ sys.argv[0] + """ [OPTIONS]""" +\ '-l, --log-file=name Log file path. If log file path is not given it\'s ' + os.path.splitext(sys.argv[0])[0] + '.log\n' +\ '\n\n' +\ 'Maybe you want to run cmd like that:\n' +\ -sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u admin -p admin\n' +sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u xxx -p xxx\n' version_str = """version 1.0.0""" diff --git a/tools/upgrade/upgrade_rolling_pre.py b/tools/upgrade/upgrade_rolling_pre.py index be9af23f8..5f2ba2424 100755 --- a/tools/upgrade/upgrade_rolling_pre.py +++ b/tools/upgrade/upgrade_rolling_pre.py @@ -74,7 +74,7 @@ sys.argv[0] + """ [OPTIONS]""" +\ '-l, --log-file=name Log file path. If log file path is not given it\'s ' + os.path.splitext(sys.argv[0])[0] + '.log\n' +\ '\n\n' +\ 'Maybe you want to run cmd like that:\n' +\ -sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u admin -p admin\n' +sys.argv[0] + ' -h 127.0.0.1 -P 3306 -u xxx -p xxx\n' version_str = """version 1.0.0"""