pingcap / pingcap/tidb

Typo in the code of `@@plugin_audit_log_buffer_size`(sysvar.go)

Open
#64,237 0 comments 0 reactions 1 assignee Claimed by @bb7133 View on GitHub
severity/minor sig/sql-infra type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

The following code:

https://github.com/pingcap/tidb/blob/22302fbc51f5fcbb428d77b32e61097c72b664ed/pkg/sessionctx/variable/sysvar.go#L589

Is wrong:

```
{Scope: vardef.ScopeInstance, Name: vardef.PluginAuditLogBufferSize, Value: strconv.Itoa(config.GetGlobalConfig().Instance.PluginAuditLogFlushInterval), ReadOnly: true
```

But there is no bug caused by the mistake, since the value of `@@plugin_audit_log_buffer_size` is retrieved [here](https://github.com/pingcap/tidb/blob/22302fbc51f5fcbb428d77b32e61097c72b664ed/pkg/sessionctx/variable/sysvar.go#L590).

'Default value' is meanningless to read only variables.

### 2. What did you expect to see? (Required)
NA

### 3. What did you see instead (Required)
NA

### 4. What is your TiDB version? (Required)
Not important

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.