pingcap / pingcap/tidb

Dashboard slow query page formatting SQL text with "hexadecimal literals" is incorrect

Open
#52,973 0 comments 0 reactions 0 assignees View on GitHub
severity/minor sig/diagnosis type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Dashboard slow query page formatting SQL text with "hexadecimal literals" is incorrect

### 1. Minimal reproduce step (Required)

1. Execute sql
```
select HEX('TiDB'),X'54694442',0x54694442,sleep(1);
```

2. Query Dashboard slow query page.

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

Dashboard slow query page
There's an extra space
```
SELECT
HEX('TiDB'),
X '54694442',
0x54694442,
sleep(1);
```

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

```
SELECT
HEX('TiDB'),
X'54694442',
0x54694442,
sleep(1);
```

### 4. What is your TiDB version? (Required)
```
Release Version: v8.0.0
Edition: Community
Git Commit Hash: 8ba1fa452b1ccdbfb85879ea94b9254aabba2916
Git Branch: HEAD
UTC Build Time: 2024-03-28 14:22:34
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv
```

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.