Getting error in tidb 8138 (HY000): writing inconsistent data in table: t1, expected-values:{KindMysqlBit } != record-values:{KindMysqlBit 0x00}
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
create table t1(a bit not null);
insert ignore into t1 values (), (), ();
select group_concat(distinct a) from t1;
select group_concat(distinct a order by a) from t1;
drop table t1;
```
### 2. What did you expect to see? (Required)
```sql
mysql> create table t1(a bit not null);
ERROR 1050 (42S01): Table 't1' already exists
mysql> insert ignore into t1 values (), (), ();
Query OK, 3 rows affected, 1 warning (0.00 sec)
Records: 3 Duplicates: 0 Warnings: 1
mysql> select group_concat(distinct a) from t1;
+----------------------------------------------------+
| group_concat(distinct a) |
+----------------------------------------------------+
| 0x30 |
+----------------------------------------------------+
1 row in set (0.00 sec)
mysql> select group_concat(distinct a order by a) from t1;
+--------------------------------------------------------------------------+
| group_concat(distinct a order by a) |
+--------------------------------------------------------------------------+
| 0x30 |
+--------------------------------------------------------------------------+
1 row in set (0.01 sec)
mysql> drop table t1;
Query OK, 0 rows affected (0.01 sec)
```
### 3. What did you see instead (Required)
```sql
mysql> create table t1(a bit not null);
ERROR 1050 (42S01): Table 'test.t1' already exists
mysql> insert ignore into t1 values (), (), ();
ERROR 8138 (HY000): writing inconsistent data in table: t1, expected-values:{KindMysqlBit } != record-values:{KindMysqlBit 0x00}
mysql> select group_concat(distinct a) from t1;
+--------------------------+
| group_concat(distinct a) |
+--------------------------+
| NULL |
+--------------------------+
1 row in set (0.00 sec)
mysql> select group_concat(distinct a order by a) from t1;
+-------------------------------------+
| group_concat(distinct a order by a) |
+-------------------------------------+
| NULL |
+-------------------------------------+
1 row in set (0.00 sec)
mysql> drop table t1;
Query OK, 0 rows affected (0.01 sec)
```
### 4. What is your TiDB version? (Required)
```sql
| Release Version: v6.1.0-alpha-480-g9f7813ca6
Edition: Community
Git Commit Hash: 9f7813ca6009fce061e92ae38a0b45cbfbc200f4
Git Branch: master
UTC Build Time: 2022-05-19 20:32:03
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
```
Contributor guide
Assessment
This issue has not been assessed yet.