pingcap / pingcap/tidb

Should 'alter user' statement print more log information

Open
#59,397 0 comments 0 reactions 1 assignee Claimed by @Defined2014 View on GitHub
question severity/moderate 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)

`alter user test failed_login_attempts 10`

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

Mabye log like

```
["secure text"="alter user test1417832@% failed_login_attempts ?"]
```

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

From the log, I see this line

```
[2025/02/11 15:06:53.508 +08:00] [INFO] [session.go:4109] ["CRUCIAL OPERATION"] [conn=239075682] [schemaVersion=55] ["secure text"="alter user test1417832@%"] [user=root@%]
```

ALTER TABLE has a lot options, shall we add more details about this operation in log?

https://docs.pingcap.com/tidb/stable/sql-statement-alter-user

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

v8.5

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.