-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
MySQL [(none)]> use test
Database changed
MySQL [test]> create table t100 (c int primary key, c2 enum('a', 'b'));
Query OK, 0 rows affected (0.010 sec)
MySQL [test]> set session sql_mode = '';
Query OK, 0 rows affected (0.001 sec)
MySQL [test]> insert into t100 values(5, 0);
Query OK, 1 row affected, 1 warning (0.001 sec)
MySQL [test]> insert into t100 values(4, 'a');
Query OK, 1 row affected (0.002 sec)
MySQL [test]> insert into t100 values(4, 0) on duplicate key update c=values(c), c2=values(c2);
Query OK, 2 rows affected, 2 warnings (0.003 sec)
MySQL [test]> show warnings;
+---------+------+------------------------------------------+
| Level | Code | Message |
+---------+------+------------------------------------------+
| Warning | 1265 | Data truncated for column '%s' at row %d |
| Warning | 1265 | Data truncated for column '%s' at row %d |
+---------+------+------------------------------------------+
2 rows in set (0.001 sec)
MySQL [test]> select * from t100;
+---+------+
| c | c2 |
+---+------+
| 4 | |
| 5 | |
+---+------+
2 rows in set (0.007 sec)
MySQL [test]> insert into t100 values(4, 'a') on duplicate key update c=values(c), c2=values(c2);
Query OK, 2 rows affected, 1 warning (0.002 sec)
MySQL [test]> show warnings;
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
MySQL [test]> select * from t100;
+---+------+
| c | c2 |
+---+------+
| 4 | a |
| 5 | |
+---+------+
2 rows in set (0.007 sec)
MySQL [test]>
2. What did you expect to see? (Required)
message is normal
3. What did you see instead (Required)
Data truncated for column '%s' at row %d
ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference
4. What is your TiDB version? (Required)
Release Version: v5.4.0-alpha-573-g0943e10d5
Edition: Community
Git Commit Hash: 0943e10d50c814efc72231f0c7d59204b69773fd
Git Branch: master
UTC Build Time: 2021-12-31 02:18:26
GoVersion: go1.17.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Metadata
Metadata
Assignees
Labels
affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.0affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.2severity/majorsig/executionSIG executionSIG executiontype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.