提交 150d93bb 编写于 作者: B bx0 提交者: LINGuanRen

Defense failed with perf event and sql audit.

上级 a034e825
---
name: Bug report
about: Help us to improve this project
---
**Please check the FAQ documentation before raising an issue**
Please check the old issues before raising an issue in case someone has asked the same question that you are asking.
**Describe the bug (__must be provided__)**
A clear and concise description of what the bug is.
**Your Environments (__must be provided__)**
* OS: `uname -a`
* Compliler: `g++ --version` or `clang++ --version`
* CPU: `lscpu`
* Commit id (e.g. `a3ffc7d8`)
**How To Reproduce(__must be provided__)**
Steps to reproduce the behavior:
1. Step 1
2. Step 2
3. Step 3
**Expected behavior**
A clear and concise description of what you expected to happen.
**Additional context**
Provide logs and configs, or any other context to trace the problem.
name: Bug report
description: bug report for OceanBase
title: "[Bug]: "
labels: [bug]
assignees:
- caifeizhi
body:
- type: checkboxes
attributes:
label: Please check the issue list for the same bug
options:
- label: I have checked issue list and this bug is encountered for the first time.
required: true
- type: textarea
attributes:
label: Environment
description: |
Environment Details sometimes important
value: |
- OB Version&commit_id or other module version&commit_id (e.g. observer V3.1.2 8b23a93):
- Hardware parameter:OS type & Compliler & CPU etc.
- Others
render: markdown
validations:
required: false
- type: textarea
attributes:
label: Fast Reproduce Steps(Required)
validations:
required: true
- type: textarea
attributes:
label: Actual Behavior
description: What is the result? picture is allowed
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: what you expected.
validations:
required: false
- type: textarea
attributes:
label: other information
description: Error Log or Core stack or Others
validations:
required: false
name: question
description: concise description of the problem.
title: "[Question]: "
labels: [question]
assignees:
- caifeizhi
body:
- type: markdown
attributes:
value: |
Make sure you have:
* Searched [GitHub issue](https://github.com/oceanbase/oceanbase/issues)
* Searched [documentation](https://open.oceanbase.com)
- type: textarea
attributes:
label: Describe your question
description: better to provide some pictures.
validations:
required: true
......@@ -39,8 +39,10 @@ const char* const MINOR_FREEZE_TIMES = "minor_freeze_times";
const char* const MAJOR_COMPACT_TRIGGER = "major_compact_trigger";
const char* const ENABLE_PERF_EVENT = "enable_perf_event";
const char* const ENABLE_SQL_AUDIT = "enable_sql_audit";
const char* const CONFIG_TRUE_VALUE = "1";
const char* const CONFIG_FALSE_VALUE = "0";
const char* const CONFIG_TRUE_VALUE_BOOL = "1";
const char* const CONFIG_FALSE_VALUE_BOOL = "0";
const char *const CONFIG_TRUE_VALUE_STRING = "true";
const char *const CONFIG_FALSE_VALUE_STRING = "false";
const char* const OBCONFIG_URL = "obconfig_url";
const char* const SCHEMA_HISTORY_RECYCLE_INTERVAL = "schema_history_recycle_interval";
const char* const _RECYCLEBIN_OBJECT_PURGE_FREQUENCY = "_recyclebin_object_purge_frequency";
......
......@@ -2148,7 +2148,8 @@ int ObSetConfigResolver::resolve(const ParseNode& parse_tree)
LOG_USER_ERROR(OB_NOT_SUPPORTED, "set enable_perf_event and enable_sql_audit together");
LOG_WARN("enable_perf_event and enable_sql_audit should not set together", K(ret));
} else if (0 == STRCMP(item.name_.ptr(), ENABLE_PERF_EVENT) &&
0 == STRCMP(item.value_.ptr(), CONFIG_FALSE_VALUE)) {
(0 == STRCASECMP(item.value_.ptr(), CONFIG_FALSE_VALUE_BOOL) ||
0 == STRCASECMP(item.value_.ptr(), CONFIG_FALSE_VALUE_STRING))) {
if (GCONF.enable_sql_audit) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "set enable_perf_event to false when enable_sql_audit is true");
......@@ -2159,7 +2160,9 @@ int ObSetConfigResolver::resolve(const ParseNode& parse_tree)
LOG_WARN("add config item failed", K(ret), K(item));
}
} else if (0 == STRCMP(item.name_.ptr(), ENABLE_SQL_AUDIT) &&
0 == STRCMP(item.value_.ptr(), CONFIG_TRUE_VALUE) && !GCONF.enable_perf_event) {
(0 == STRCASECMP(item.value_.ptr(), CONFIG_TRUE_VALUE_BOOL) ||
0 == STRCASECMP(item.value_.ptr(), CONFIG_TRUE_VALUE_STRING)) &&
!GCONF.enable_perf_event) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "set enable_sql_audit to true when enable_perf_event is false");
LOG_WARN("enable_sql_audit cannot set true when enable_perf_event is false", K(ret));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册