pingcap / pingcap/tidb

Unexpected ExprType MysqlBit and EvalType Int

Open
#34,880 3 comments 0 reactions 0 assignees View on GitHub
affects-6.0 affects-6.1 affects-6.2 affects-6.3 affects-6.4 may-affects-4.0 may-affects-5.0 may-affects-5.1 may-affects-5.2 may-affects-5.3 may-affects-5.4 severity/moderate sig/execution type/bug
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)

tiup deploy a cluster
```
use test;
drop table if exists NT_28395;
CREATE TABLE `NT_28395` (
`COL1` bit(28) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
insert into NT_28395 values(0x00DE25BE);
select col1 from NT_28395 t1 where (select count(*) from NT_28395 t2 where t2.col1 in (t1.col1, 0x30)) > 1;
```
### 2. What did you expect to see? (Required)
```
mysql> select col1 from NT_28395 t1 where (select count(*) from NT_28395 t2 where t2.col1 in (t1.col1, 0x30)) > 1;
Empty set
```
### 3. What did you see instead (Required)
```
mysql> select col1 from NT_28395 t1 where (select count(*) from NT_28395 t2 where t2.col1 in (t1.col1, 0x30)) > 1;
ERROR 1105 (HY000): other error: [components/tidb_query_expr/src/impl_compare_in.rs:68]: Unexpected ExprType MysqlBit and EvalType Int
```
### 4. What is your TiDB version? (Required)

```
Release Version: v6.1.0-alpha
Edition: Community
Git Commit Hash: 388b3c79cc3a313aee59334ebe6fc7dc451769c3
Git Branch: heads/refs/tags/v6.1.0-alpha
UTC Build Time: 2022-05-22 15:03:09
GoVersion: go1.18.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
```

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.