Closed
Description
Bug Report
ref #51306
Errors of errStrForLog, handleAssertionFailure
is already redacted, and we should not redact it again.
Lines 1166 to 1181 in d2eb902
1. Minimal reproduce step (Required)
mysql> create table t (a int, unique key (a));
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t values (1),(1);
ERROR 1062 (23000): Duplicate entry '1' for key 'a'
mysql> set @@session.tidb_redact_log=1;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t values (1),(1);
ERROR 1062 (23000): Duplicate entry '?' for key '?'
2. What did you expect to see? (Required)
[2024/04/07 11:09:34.014 +08:00] [INFO] [conn.go:1147] ["command dispatched failed"] [conn=2097154] [session_alias=] [connInfo="id:2097154, addr:[::1]:46506 status:10, collation:utf8mb4_general_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="insert into `t` values ( ‹1› ) , ( ‹1› )"] [txn_mode=PESSIMISTIC] [timestamp=448910950141526016] [err="[kv:1062]Duplicate entry '‹1›' for key 't.a'"]
3. What did you see instead (Required)
[2024/04/07 11:09:34.014 +08:00] [INFO] [conn.go:1147] ["command dispatched failed"] [conn=2097154] [session_alias=] [connInfo="id:2097154, addr:[::1]:46506 status:10, collation:utf8mb4_general_ci, user:root"] [command=Query] [status="inTxn:0, autocommit:1"] [sql="insert into `t` values ( ‹1› ) , ( ‹1› )"] [txn_mode=PESSIMISTIC] [timestamp=448910950141526016] [err="‹[kv:1062]Duplicate entry '‹‹1››' for key 't.a'›"]
4. What is your TiDB version? (Required)
master