Retrying transaction with a double type auto-increment column leads to data error #29892
Closed
Description
opened on Nov 18, 2021
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Prepare:
tidb> set global tidb_txn_mode='optimistic';
Query OK, 0 rows affected (0.01 sec)
tidb> set global tidb_disable_txn_auto_retry=false;
Query OK, 0 rows affected (0.01 sec)
In session1:
session1> create table t(a double key auto_increment, b int);
Query OK, 0 rows affected (0.03 sec)
session1> insert into t values (146576794, 1);
Query OK, 1 row affected (0.01 sec)
session1> begin;
session1> insert into t(b) select 1;
In session2:
session2> begin;
Query OK, 0 rows affected (0.00 sec)
session2> insert into t values (146576795, 1);
Query OK, 1 row affected (0.00 sec)
session2> insert into t values (146576796, 1);
Query OK, 1 row affected (0.00 sec)
session2> commit;
Query OK, 0 rows affected (0.01 sec)
In session1:
session1> commit;
Query OK, 0 rows affected (2.63 sec)
session1> select * from t;
ERROR 1105 (HY000): Failed to decode datum payload as f64
2. What did you expect to see? (Required)
Query without an error.
3. What did you see instead (Required)
ERROR 1105 (HY000): Failed to decode datum payload as f64
4. What is your TiDB version? (Required)
master
Activity