pingcap / pingcap/tidb

Warning on not detecting collation by name

Open
#45,699 0 comments 0 reactions 1 assignee Claimed by @wjhuang2016 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
I am getting following warning in the logs :
```
[2023/07/31 16:45:37.090 +02:00] [WARN] [collate.go:362] ["Unable to get collation ID by name, use ID of the default collation instead"] [name=] ["default collation ID"=-46] ["default collation"=utf8mb4_bin]
[2023/07/31 16:45:37.090 +02:00] [WARN] [collate.go:362] ["Unable to get collation ID by name, use ID of the default collation instead"] [name=] ["default collation ID"=-46] ["default collation"=utf8mb4_bin]
[2023/07/31 16:45:37.090 +02:00] [WARN] [collate.go:362] ["Unable to get collation ID by name, use ID of the default collation instead"] [name=] ["default collation ID"=-46] ["default collation"=utf8mb4_bin]
```

New collection variable is set to true

```
-----------------+----------------+----------------------------------------------------+
| VARIABLE_NAME | VARIABLE_VALUE | COMMENT |
+-----------------------+----------------+----------------------------------------------------+
| new_collation_enabled | True | If the new collations are enabled. Do not edit it. |
+-----------------------+----------------+----------------------------------------------------+

```

The only collections used are (same are used for the tables) :

```
mysql> SELECT COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS group by COLLATION_NAME;
+--------------------+
| COLLATION_NAME |
+--------------------+
| utf8mb4_bin |
| utf8mb4_unicode_ci |
| utf8_general_ci |
| NULL |
| utf8_bin |
| utf8mb4_general_ci |
+--------------------+
6 rows in set (0.03 sec)
```

### 1. Minimal reproduce step (Required)
Can't really reproduce it as i do not know where the problem is

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

No warning

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

Warning

### 4. What is your TiDB version? (Required)
Release Version: v7.1.0
Edition: Community
Git Commit Hash: 635a4362235e8a3c0043542e629532e3c7bb2756
Git Branch: heads/refs/tags/v7.1.0
UTC Build Time: 2023-05-30 10:58:57
GoVersion: go1.20.3
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
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.